PhpStorm Tips, ticks and standard setup
- Tips and Tracks for PHPStorm (PHPStorm Tips and Tricks.md)
- Standard setup for PHP projects (Standard.md)
A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.
Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.
| [In reply to Moroshka] | |
| Распишу по буквам, потом в совокупности | |
| S - (SRP): | |
| https://www.youtube.com/watch?v=AEnePs2Evg0 | |
| https://goo.gl/LatDmF (link wikipedia) | |
| O - (Open/closed): | |
| https://www.youtube.com/watch?v=DJF_sGOs2V4 | |
| https://goo.gl/6p3jfY (link wikipedia) | |
| L - (Liskov): | |
| https://www.youtube.com/watch?v=bVwZquRH1Vk |
This is proof-of-concept implementation of laravel's like form requests.
Most of Symfony developers uses forms to map request data to some Data Transfer Object. This object then passes to validator and system start to work with validated data converted to be compatible with application model.
| From this [issue](https://github.com/puphpet/puphpet/issues/1025#issuecomment-157059174): | |
| I know that this issue is closed, but as I spent a lot of time to understand what was going on, I made some researches and I can explain why this happen, and you can fix it. | |
| Using git config core.autocrlf true can help, but not on a multi-developpers project. | |
| This command has to be the same on each developper machine, and that's not always the case. | |
| You have to use the .gitattributes provided in the puphpet archive and edit it as follow (carefull, this file need to be in your project root) | |
| You also need to use an IDE that allow you to save/edit files as LF (like phpstorm). You can check the type of the file in the bottom right corner, in the status bar (you'll see LF or CRLF while a file is opened) |