Symfony2 Override
Sublime Text 3 Package for easy overriding files from Symfony2 bundles
Details
Installs
- Total 3K
- Win 0
- Mac 912
- Linux 2K
Sep 9 | Sep 8 | Sep 7 | Sep 6 | Sep 5 | Sep 4 | Sep 3 | Sep 2 | Sep 1 | Aug 31 | Aug 30 | Aug 29 | Aug 28 | Aug 27 | Aug 26 | Aug 25 | Aug 24 | Aug 23 | Aug 22 | Aug 21 | Aug 20 | Aug 19 | Aug 18 | Aug 17 | Aug 16 | Aug 15 | Aug 14 | Aug 13 | Aug 12 | Aug 11 | Aug 10 | Aug 9 | Aug 8 | Aug 7 | Aug 6 | Aug 5 | Aug 4 | Aug 3 | Aug 2 | Aug 1 | Jul 31 | Jul 30 | Jul 29 | Jul 28 | Jul 27 | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Windows | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Mac | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 |
Linux | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Readme
- Source
- raw.githubusercontent.com
Symfony2 Override
Sublime Text 3 Package for easy overriding files from Symfony2 bundles.
It greatly simplifies the work with bundles, that have files with a high level of nesting.
Features
At this time, package can override php files, twig templates, translations in any format and any file from Resources/public
folder.
For example, it can:
- Copy Twig templates from vendor/Vendor/BundleName/Resources/views/High/Nesting/Level/template.html.twig
to app/Resources/VendorBundleName/views/High/Nesting/Level/template.html.twig
or src/SelectedBundleName/Resources/views/High/Nesting/Level/template.html.twig
.
- Copy .xliff
, .yml
, .php
or whatever files from vendor/Vendor/BundleName/Resources/translations/whatever.yml
to src/SelectedBundleName/Resources/translations/whatever.yml
or app/Resources/VendorBundleName/translations/whatever.yml
.
- Copy .php
files from vendor/Vendor/BundleName/High/Nesting/Level/Whatever.php
to src/SelectedBundleName/High/Nesting/Level/Whatever.php
.
- Replace old namespace to new one
- Paste use Vendor\BundleName\High\Nesting\Level\Whatever as BaseWhatever
statement with source class namespace
- Replace class Whatever
or class Whatever extends SomeBaseClass
to class Whatever extends BaseWhatever
- Copy files from public
folder to selected bundle (css, js, etc)
After file have been copied, it automatically opens in editor.
Limitations
- Package work only in Sublime Text 3. Not tested in Sublime Text 2.
- Package tested only on Ubuntu and MacOS environment.
- At that moment package supports overriding only PSR-0 libraries from
vendors
directory
TODO
Functions that will be implemented in future collected in TODO.md.
Installation
Manual
Ubuntu
cd ~/.config/sublime-text-3/Packages
git clone https://github.com/igormukhingmailcom/sublimetext3-symfony2-override-package.git "Symfony2 Override"
MacOS
cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages
git clone https://github.com/igormukhingmailcom/sublimetext3-symfony2-override-package.git "Symfony2 Override"
Via Package Control
Install Package Control in your Sublime Text.
Press Ctrl+Shift+P
, type Install Package
, press Enter
, type Symfony2 Override
, press Enter
.
Usage
Override current file
Press Ctrl+Shift+O
on Linux
or Command+Shift+O
on MacOs
and select a bundle to copy current file to.
Also Override...
menu item available at Context Menu, Side Bar Menu and Main Menu -> File.
If file already overriden, it will be just opened.
License
MIT