This reverts commit 5cdac95adc.
Due to the https://github.com/php/web-bugs/pull/77 discussion and
request from a prominent member of the PHP group - Kalle - I'm reverting
this awesome addition because it caused too many conflicts and issues.
So it is not worth of investing more from my side into this neither
having a ruined experience further on from any side here.
This fix has been really helpful with some development ways but people
who maintain this app further better have peace of mind...
When developing site locally, developer needs to have data sets to run
manual tests, see how the app is built, and similar. The new additional
command line command using Symfony/Console component creates a main
scripts/console entry point for running Commands. Initial set of demo
fixtures data is generated using the faker library and includes most
data needed to use and test application manually in the local
environment.
- Added filter to phpunit config
- This enables support for coverage support
- Moved unit tests to dedicated directory
- Also created constants for the locations of the fixtures and mocks for
testing so we do not have to use relative paths in tests
- Updated phpunit to 8
- Added type information to tests
- Added return type and parameter type declarations for tests
- Added strict types to tests
- CS fixes in tests
- Aligning arrays, consistent string concatenation, removed unused local
vars
- Added constant for test cache directory
- Make the autoloader also properly work on windows
- Windows does not care about the directory separator used so just trim
both variant from the end.
This patch introduces a dependency injection container for the PHP bug
tracker application. Container deals with the creation of all service
classes and additionally provides retrieving of configuration parameters.
Service classes are used everywhere in the app - from accessing database
to uploading files. Configuration parameters include infrastructure
configuration (database credentials...) and application level
configuration (directories locations...).
Container is compatible with the PSR-11 container interface defined
so it is simple to quickly understand its usage. Advanced features
such as autowiring are not included in this phase.
- Procedural code moved to OOP
- Added unit tests
- Added a more flexible tmp folder location and introduce var folder
(in production this won't work yet, so we still use /tmp there).
For local development environments var directory in project root
is used for faster and easier project setup.
- Added initial extensible PSR-16-alike semi-compatible cache class
and refactored storing fetched versions.
- The versions list generator is now simpler and a bit more logical
what is happening. Versions sort order is the same as before.
- Added ComposerScripts utility/service class for creating required
directories (uploads and var/cache), and configuration file, when
installing application in development environment.
This patch adds an initial simplistic template engine to separate logic
from the presentation.
Basic initial features:
- escaping via Context::noHtml() and Context::e() methods
- blocks
- nesting options using includes and extending layouts
- PHP syntax
- variable scopes dedicated to template scope only
- Appending blocks (when JS files are in need to be appended)
- initial unit and functional tests
- Main index page refactored as an example of usage
- Very short intro docs how to use the template layer
- Thanks to @nhlm for the code review and numerous suggestions to
improve the usability and code stability,
- Thanks to @KalleZ and for the code review and numerous common sense
suggestions about templates themselves.
- Thanks to @Maikuolan for the code review and numerous suggestions
about the usability.
- Moved hash ids redirection to aseparate JavaScript file
- Use location instead of window.location in the JavaScript redirection
Discussions:
- http://news.php.net/php.webmaster/27603
- https://github.com/php/web-bugs/pull/66
This patch moves patches uploading functionality from the outdated
HTTP_Upload package to a dedicated service class in the app.
Additional changes in this context:
- Functionality concerning retrieving patches data from database has
been moved to a separate repository classes.
- Some missed bugs fixed when uploading patches and no developer info
were recorded.
- Obsoleting patches functionality is now working again.
- Added a simple unit test.
This patch is a workaround until Composer installation step can be used
in production bugs.php.net. Once Composer can be added to the deployment
step together with rsync this can be simplified and only Composer's
autoload.php will be used.
The Text_CAPTCHA_Numeral can be integrated in the project source code
instead of using a separate unmaintained dependency.
This patch also adds a simple unit test.