Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
68 changed files
with
5 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8769a67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome PR! :)
8769a67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering, proper place for test is
/tests
directory. The more you are going for PSR-4 now.This is more standard for most packages:
I recall we had similar discussion, but now I see you are upgrading to new packages and architecture pattern, so I think this would go very well along.
8769a67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a preview: https://github.com/TomasVotruba/test-tools/pull/1/files
It would make even
phpunit.xml.dist
configuration bit more readable :)8769a67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reaching out again on this matter. My goal is not to do things the same as the mass, but to do it better if possible. Having a common namespace, just to put things in different root directories and then use the autoloader to bring it together again doesn't make a lot of sense to me. For example, you need much more vertical space in the file browser of your favourite IDE to see both trees at the same time. A major inconvenience. Having a separate directory can make sense, if the tests are too big to ship, like it is the case with Doctrine. It's how it started, but in 2017 it's ok to have the tests as part of your regular source. Coding itself is so complex, so finding the tests directory should be a very easy task for a developer, especially since a Tests directory is also standard for Symfony, easily the most popular PHP framework out there.
8769a67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Symfony is very slow in adapting good practice, be aware of that. It makes sense, because it's the oldest and most spread PHP framework and it can't afford to make many changes (opposed to much younger Laravel).
I didn't realize it before studying other frameworks and making my own set of packages and applying them to various frameworks.
If you are open to "non-Symfony-way", but PHP-way, feel free to find inspiration here:
app/cache
directory, and still is in Symfony 2.8 by defaultNever the case. There is no benefit in slowing down production code by tests, when speed is important more than ever to get customer's attention.
8769a67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Symfony is not the oldest PHP framework - actually it's quite young (I started using PHP in 1998) and especially the DI concept of Symfony 2 was a major step forward for the PHP community. Thank you for the links, I'm going to read them :)
Since I will always ship my code with tests, using a different directory will not make the code slower or faster. Not shipping with tests might make a difference, but I doubt it can be measured. If you come up with bold claims like that, I want to see some facts like a benchmark.
8769a67
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Times flies slow, even Laravel is old framework for me now :D Not in the age number, but architectural concepts it was and is build on.
What is the oldest used PHP framework then?
As for DI. Symfony promoted constructor injection only, which is like using DI on 20 % of it's maximum power and doesn't save almost any time and influence architecture. It was actually Nette that introduced DI with constructor autowiring:
(they're in Czech, but Google Translator should do)