rocknroot/stray-fw

A PHP web framework for rock 'n' rollers.

0.4.6 2019-12-02 22:25 UTC

This package is not auto-updated.

Last update: 2020-07-10 18:12:09 UTC


README

Build Status

strayFw is a PHP framework trying to be modern without following fashion, between full-featured frameworks and micro ones.

Code is free, new-BSD license. So... fork us!

Why? / Why not?

  • It's beta software.
  • Contain neither dependency injection nor annotations in comments.
  • Making use of type hinting anywhere possible.
  • Use of reflection at runtime as limited as possible.
  • strayFw follows a small selection of PSR (see below: Contribute > Technical considerations).
  • Configuration over convention.
  • Data models are defined by a schema in YAML. Migrations are, for the most part, generated by a diff between schemas.
  • Data models are generated by the CLI ahead of runtime (web server time).
  • Composer dependencies are minimal.
  • MySQL is not supported, only PostgreSQL.

Requirements

  • PHP >= 7.2
  • mbstring extension
  • For the Locale namespace, intl extension >= 1.0.0
  • For the Twig renderer, twig/twig >= 2.0

Get started

With composer create-project

  • get composer
  • composer create-project rocknroot/stray-fw-skeleton

Need help?

You can add an issue on github ;)

Contribute

Contributors

Technical considerations

The framework follows these standards:

Static analysis

$ vendor/bin/phpstan analyse src --level=max

Coding standards

$ curl -L https://cs.symfony.com/download/php-cs-fixer-v2.phar -o php-cs-fixer
$ php php-cs-fixer.phar fix src/RocknRoot/StrayFw --rules='{"@PSR2":true,"no_trailing_comma_in_singleline_array":true,"no_singleline_whitespace_before_semicolons":true,"concat_space":{"spacing":"one"},"no_unused_imports":true,"no_whitespace_in_blank_line":true,"ordered_imports":true,"blank_line_after_opening_tag":true,"declare_equal_normalize":{"space":"single"},"function_typehint_space":true,"hash_to_slash_comment":true,"lowercase_cast":true,"method_separation":true,"native_function_casing":true,"no_blank_lines_after_class_opening":true,"no_blank_lines_after_phpdoc":true,"no_leading_import_slash":true,"no_leading_namespace_whitespace":true,"no_mixed_echo_print":{"use":"echo"},"phpdoc_add_missing_param_annotation":true,"phpdoc_align":true,"phpdoc_indent":true,"phpdoc_no_empty_return":true,"phpdoc_order":true,"phpdoc_scalar":true,"phpdoc_single_line_var_spacing":true,"phpdoc_types_order":true,"phpdoc_var_annotation_correct_order":true}'