-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge v0.2.0 changes into master for release #8
Conversation
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 does not work yet. :-)
It's now possible to create a PHP archive via "make phar" or by calling "bin/compile". The command creates a self-executable PHP archive that can be used standalone.
- coding standard fixes (psr-2) - phpunit runs with phpunit.xml.dist in root directory - add basetestcase - remove non-working requirements for a fresh start
This commit is a first draft of a "check" commandline argument command that checks a list of "ICheck" implementing instances. There's a CheckRunner that collects the IResult instances of the ICheck instances and generates an IReport instance, that is used to output the messages from the Checks using a simple ConsoleFormatter. The Results contain messages and settings, thus every ICheck may add IMessages with a text and certain severity level to the Result as well as emit some Settings that can be later returned in a meaningful way by the CheckCommand.
Configurator can ask for values and is configurable with default values, autocomplete values and can determine if the input should be hidden from the user etc.
The "check" command now has three commandline options: - bootstrap: a file that is required before running the checks - config: the config file with check definitions (not implemented yet) - include_path: path to prepend to include_path PHP ini setting The three default Configurator checks are configured via an array to prepare this part of the CheckCommand for a config file parser or something like that.
Just give "bin/environaut check -v" a chance. Try specifying "-a|--autoload_dir" if the current working directory does not suffice as the directory to load specified validators from. :-) Update the environaut.phar via "bin/compile" if you need it.
CheckCommand uses the new DefaultConfigHandler and there will be readers that can read different config file formats. There's a guesser with support for xml, json and php config files as well if a config directory is given instead of a regular file. This is a work-in-progress. The PHAR is outdated and will probably be removed and only added for releases.
Big shuffling of files and namespaces, lots of documentation and the working reading of JSON and PHP configs.
- several tests for the default Validator class that may be useful for Configurator check input validation - small changes/fixes (php 5.4.0 <> 5.3.x) - enabled code-coverage to build directory
Moved Application and PharCompiler to Environaut namespace and adjusted bin/environaut and bin/compile scripts accordingly.
Added a composer file security check that looks up the SensioLabs security vulnerability database for known problems for the used vendor libs. Added a bit of preliminary documentation to make it easier to understand the usage of checks.
testSimpleValueQuestionWithFailedValidationAfterSomeAttempts and testSimpleValueQuestionWithSuccessValidationAfterSomeAttempts
merge testing changes into 0.2.0 that use PHP_EOL instead of \n
- BIG refactoring included - more docs - some tests - some examples that may be outdated now - writing of JSON/XML/PHP settings - first step for release of new version - too many things to mention (sorry) :) This should be a rather usable version now. It can read XML/JSON/PHP config files and output a report to the CLI and write settings emitted by the processed checks as XML/JSON/PHP files (for apps to include/use).
- XML entities as shortnames for namespaced classnames of checks - updated example config files - updated checks documentation with XML examples instead of JSON - made MbInternalEncoding check more configurable - made Configurator use name as default setting name for less verbose syntax - added TODO.md just in case I'm getting more oblivious - updated README with a hopefully better quickstart
information from the composer.json file as Packagist will determine naming from the branch and tag names automatically (I hope).
Github Pull Requests. :-)
- Integer values are now compared as PHP does internally (if a value has 0.25M it will be 0 for PHP). - Configurator now adds newlines itself to have a better working progress bar in the runner
Added some more tests for the PhpSettingCheck as well.
- TravisCI build should fail on PSR-2 coding style failures - added some tests - added some first example extension checks
Check interface now expects setters for name, group and parameters. Further on there should be getters for the default group and settings group names. The available checks have been changed from being instantiated via constructor to those setters. Configurator and other checks can now export settings with a different group name from the check's (default) group name. Tests have been adjusted accordingly. Example check configuration has been updated with more verbose examples.
Configurator and ExecutableCheck now use a .environaut.cache file if it's present to not ask again for a value when it's in the cache file. There's a commandline switch to set the cache file to use for this, but as that's used for writing as well it should probably be possible to separate reading from writing to benefit from old caches, but still write the new cache to a different location. Have to think about that. The Configurator and ExecutableCheck should also ask the User to confirm the value and perhaps don't show sensitive values (HIDDEN) by default, but still be able to reuse those. The current implementation of the caching makes it mandatory for checks to add the cachable settings to the result and reset those settings on the result even if they read/take them from the cache. The difference between the readonly cache location used for the checks is, that there may be completely different caches on subsequent runs and thus the cached settings get old and will not be removed from the cache if it's not rewritten properly with only the currently active and wanted settings. The cache will always be written, but should probably only be written with succeeded checks etc. This is a TODO.
- added example screenshot of two subsequent runs with caching - fixed small bugs and spelling errors - fixed no-cache option to actually work correctly
for reading and writing of cache files. That is, you can read cached settings from somewhere and write them to somewhere else via configuration <cache> parameters "read_location" and "write_location" instead of just using "location". Change: Only cachable settings from checks that returned "true" (that is, ran successfully) will be written to the cache file.
graste
added a commit
that referenced
this pull request
Aug 5, 2013
Merge v0.2.0 changes into master for release
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There should be a 0.2.0 release as a first usable version of environaut that includes the changes below.