(note the trailing dot), which Windows Explorer will automatically rename to. editorconfig file within Windows Explorer, you need to create a file named. Properties from matching EditorConfig sections are applied in the order they were read, so properties in closer files take precedence.įor Windows Users: To create an. editorconfig files will stop if the root filepath is reached or an EditorConfig file with root=true is found.ĮditorConfig files are read top to bottom and the most recent rules found take precedence. editorconfig in the directory of the opened file and in every parent directory. When opening a file, EditorConfig plugins look for a file named. indent_style = space indent_size = 2Ĭheck the Wiki for some real-world examples of projects using EditorConfig files. end_of_line = lf insert_final_newline = true # Matches multiple files with brace expansion notation I could just link to the package which is nice, but I can also just link to the specific files I'm working on like a class, service provider or console command.įind something better feel free to leave a comment.Root = true # Unix-style newlines with a newline ending every file The last benefit of this is another suprising speed boost where I don't have to search out all the vendor directory for my package and/or the specific files I'm working on. This essetially lets me bring in any outside code into the project and work on them simultaneously while not touching the vendor directory and further version control will never trigger. However instead of editing it in another editor window or in the vendor directory I make a vendor-dev directory and simply add /vendor-dev to my `.gitignore'. This isn't neccessarily the best for everyone, but it accomplishes letting me import a package into the project while the package is in active development without a phpstorm utility to let you include that directory.īasically I use Approach 3, which uses studio to make soft links from your vendor directory package to the code of the package. I came up with a workflow that works for me. 3 cheers for you for making it to the end. Then the only thing needed is an app or terminal to commit the package project incrementally as needed. Sim linking the project repo into the vendor so it's always up to date as I edit in the IDE folder.ģ. Basically the IDE letting me edit the other package files much like when I was working in the linked vendor.Ģ. Have an external link in phpstorm where you can pull in the project src directory. The problem is always in the main project and then requiring a composer update to reflect the changes.ġ. This is fast but not as fast as working in the vendor directory, yet safer. Make the change I needed in the the actual repo (another screen).Plus there is a fair amount of screen switching which can be a bit of a pain when you are going back and forth with web results terminal, git and now another code editing screen. It short circuits everything for you, and is basically the best of both worlds, but you still need two different projects open and have to wait for a composer update to refresh the project in your vendor directory. I keep 2 active projects open in phpstorm. This is fast but if you forget the composer.json repositories key you are going to blow up your project and it's less trivial to update composer.json and composer lock in productionĪttempt 3 Also Fast but with other pain points Put the repositories key back in composer.json.Remove the repositories key in your composer.jsontemporarily.Commit the changes in the package project without pushing.Make the change I needed in the vendor directory (now the actual repo).The repositories key in composer.json needs to have the path to your code. And use simlinks to override the project in the vendor directory to always be the direct code. I keep 1 active project open in phpstorm. Wait for packagist to get the updated repoĪttempt 2 Pretty Fast but with pain points.Commit the changes in the package project.Copy the change into the package project.Make the change I needed in the vendor directory (yikes!).Some preamble workflows that I've tried from slowest to fastest, any advice on a better way would be appreciated. I've had a couple of workflows for this, but I'd really like to add an external directory (the package source) to my project without impacting the local git or editing in the vendor directory. I'm working in PHP Storm, on a project that's using a package I'm developing in tandem.
0 Comments
Leave a Reply. |