The charcoal-core
module contains a few core charcoal namespaces: \Charcoal\Loader
, \Charcoal\Model
, \Charcoal\Source
and \Charcoal\Validator
.
The preferred (and only supported) way of installing charcoal-core is with composer:
★ composer require locomotivemtl/charcoal-core
For a complete, ready-to-use Charcoal project, start from the boilerplate
:
★ composer create-project locomotivemtl/charcoal-project-boilerplate:@dev --prefer-source
Charcoal depends on:
PHP** 5.6+
PHP 7
is recommended, for performance and security.
ext-pdo
ext-mbstring
psr/log
psr/cache
locomotivemtl/charcoal-config
locomotivemtl/charcoal-factory
locomotivemtl/charcoal-property
locomotivemtl/charcoal-view
The validator namespace is obsolete and should not be used. Its usage is currently being removed from everywhere in charcoal.
To install the development environment:
★ composer install --prefer-source
To run the tests:
★ composer test
- The auto-generated
phpDocumentor
API documentation is available at https://locomotivemtl.github.io/charcoal-core/docs/master/ - The auto-generated
apigen
API documentation is available at https://codedoc.pub/locomotivemtl/charcoal-core/master/
phpunit/phpunit
squizlabs/php_codesniffer
satooshi/php-coveralls
Service | Badge | Description |
---|---|---|
Travis | Runs code sniff check and unit tests. Auto-generates API documentation. | |
Scrutinizer | Code quality checker. Also validates API documentation quality. | |
Coveralls | Unit Tests code coverage. | |
Sensiolabs | Another code quality checker, focused on PHP. |
The charcoal-core module follows the Charcoal coding-style:
- PSR-1
- PSR-2
- PSR-4, autoloading is therefore provided by Composer.
- phpDocumentor comments.
- Read the phpcs.xml file for all the details on code style.
Coding style validation / enforcement can be performed with
composer phpcs
. An auto-fixer is also available withcomposer phpcbf
.
- Mathieu Ducharme mat@locomotive.ca
Charcoal is licensed under the MIT license. See LICENSE for details.
- Unreleased.
- Remove the dependency on charcoal-app