locomotive-charcoal / charcoal
The Charcoal Framework monorepo
Requires
- php: ^7.4 || ^8.0
- ext-fileinfo: *
- ext-json: *
- ext-mbstring: *
- ext-pdo: *
- ext-simplexml: *
- ext-spl: *
- barryvdh/elfinder-flysystem-driver: ^0.3
- erusev/parsedown: ^1.7
- guzzlehttp/guzzle: ^6.0 || ^7.0
- kriswallsmith/assetic: ^1.4
- laminas/laminas-permissions-acl: ^2.8
- league/climate: ^3.2
- league/flysystem: ^1.0
- mcaskill/php-html-build-attributes: ^1.0
- monolog/monolog: ^1.17
- phpmailer/phpmailer: ~6.0
- pimple/pimple: ^3.0
- psr/cache: ^1.0
- psr/container: ^1.0
- psr/http-message: ^1.0
- psr/log: ^1.0
- seld/jsonlint: ^1.9
- slim/slim: ^3.7
- studio-42/elfinder: 2.1.64
- symfony/translation: ^3.4
- tedivm/stash: ~0.16
- vlucas/phpdotenv: ^5.4
Requires (Dev)
- cache/void-adapter: ^1.0
- league/csv: ^9.5
- league/flysystem-aws-s3-v3: ^1.0
- league/flysystem-memory: ^1.0
- league/flysystem-sftp: ^1.0
- mockery/mockery: ^1.0
- mustache/mustache: ^2.11
- php-coveralls/php-coveralls: ^2.2
- phpstan/phpstan: ^1.6
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.5
- symfony/yaml: ^3.0
- symplify/monorepo-builder: ^10.2
- twig/twig: ^3.4
Replaces
- charcoal/admin: v5.0.0
- charcoal/app: v5.0.0
- charcoal/attachment: v5.0.0
- charcoal/cache: v5.0.0
- charcoal/cms: v5.0.0
- charcoal/config: v5.0.0
- charcoal/core: v5.0.0
- charcoal/email: v5.0.0
- charcoal/factory: v5.0.0
- charcoal/image: v5.0.0
- charcoal/object: v5.0.0
- charcoal/property: v5.0.0
- charcoal/queue: v5.0.0
- charcoal/translator: v5.0.0
- charcoal/ui: v5.0.0
- charcoal/user: v5.0.0
- charcoal/view: v5.0.0
- locomotivemtl/charcoal-admin: *
- locomotivemtl/charcoal-app: *
- locomotivemtl/charcoal-attachment: *
- locomotivemtl/charcoal-cache: *
- locomotivemtl/charcoal-cms: *
- locomotivemtl/charcoal-config: *
- locomotivemtl/charcoal-core: *
- locomotivemtl/charcoal-email: *
- locomotivemtl/charcoal-factory: *
- locomotivemtl/charcoal-image: *
- locomotivemtl/charcoal-object: *
- locomotivemtl/charcoal-property: *
- locomotivemtl/charcoal-queue: *
- locomotivemtl/charcoal-translator: *
- locomotivemtl/charcoal-ui: *
- locomotivemtl/charcoal-user: *
- locomotivemtl/charcoal-view: *
- dev-main / 5.x-dev
- v5.0.0
- v4.1.0
- v4.0.8
- v4.0.7
- v4.0.6
- v4.0.5
- v4.0.4
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- v3.1.7
- v3.1.6
- v3.1.5
- v3.1.4
- v3.1.3
- v3.1.2
- v3.1.1
- v3.1.0
- v3.0.16
- v3.0.15
- v3.0.14
- v3.0.13
- v3.0.12
- v3.0.11
- v3.0.10
- v3.0.9
- v3.0.8
- v3.0.7
- v3.0.6
- v3.0.5
- v3.0.4
- v3.0.3
- v3.0.2
- v3.0.1
- v3.0.0
- v2.3.0
- v2.2.5
- v2.2.4
- v2.2.3
- v2.2.2
- v2.2.1
- v2.2.0
- v2.1.2
- v2.1.1
- v2.1.0
- v2.0.1
- v2.0.0
- v1.3.4
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.0
- v1.2.0-beta.25
- v1.2.0-beta.24
- v1.2.0-beta.23
- v1.2.0-beta.22
- v1.2.0-beta.21
- v1.2.0-beta.20
- v1.2.0-beta.19
- v1.2.0-beta.18
- v1.2.0-beta.17
- v1.2.0-beta.16
- v1.2.0-beta.15
- v1.2.0-beta.14
- v1.2.0-beta.13
- v1.2.0-beta.12
- v1.2.0-beta.11
- v1.2.0-beta.10
- v1.2.0-beta.9
- v1.2.0-beta.8
- v1.2.0-beta.7
- v1.2.0-beta.6
- v1.2.0-beta.5
- v1.2.0-beta.4
- v1.2.0-beta.3
- v1.2.0-beta.2
- v1.2.0-beta.1
- v1.1.1
- v1.1.1-beta.1
- v1.1.0
- v1.1.0-beta.4
- v1.1.0-beta.3
- v1.1.0-beta.2
- v1.1.0-beta.1
- v1.0.1-beta.5
- v1.0.1-beta.4
- v1.0.1-beta.3
- v1.0.1-beta.2
- v1.0.1-beta.1
- v1.0.0
- v1.0.0-beta.3
- v1.0.0-beta.2
- v1.0.0-beta.1
- dev-joel/feature/tabulator-input
- dev-feature/tabulator-input
- dev-feature/slim4
- dev-fix/gruntfile-path
- dev-joel_feat_event-dispatcher
- dev-beta
- dev-feature/admin-view
- dev-fix-paths
- dev-develop
- dev-joel/feat/migrate-tool
- dev-joel/feat/package-mapping
This package is auto-updated.
Last update: 2024-10-16 17:08:38 UTC
README
by Locomotive π
Charcoal is a web framework and content management system that adapts to all of your project's needs.
This repository is a monorepo containing the entirety of the web framework. Charcoal can be used as a full stack framework or as standalone packages which can be used independently.
Charcoal packages
Core packages can be found in the packages
directory.
Installation
The preferred (and only supported) method is with Composer:
composer require charcoal/charcoal
To start from a working skeleton:
composer create-project charcoal/boilerplate
Standalone packages
The Charcoal framework is split into standalone packages which can be used independently. For example, a project might not need an administration panel, a queue system, or to send emails.
composer require charcoal/app charcoal/api custom/admin
Migrate a project to charcoal/charcoal
The following will aide with converting a project from
locomotivemtl/charcoal-*
to charcoal/*
.
βΉοΈ Previously all core packages maintained their own version numbering independently.
The monorepo framework uses a shared version number for all core packages for consistent and expected interoperability.
βΉοΈ The contrib packages continue to maintain their existing independent version numbering.
Option A β If you want to replace all packages with the full-stack framework package:
-
Remove requirements for core packages (
locomotivemtl/charcoal-*
) in yourcomposer.json
file. -
Replace requirements for contrib packages (
locomotivemtl/charcoal-contrib-*
), in yourcomposer.json
file, with equivalents fromcharcoal/contrib-*
. -
Run
composer require charcoal/charcoal
to install the framework. -
Run
composer update
to ensure all requirements are up-to-date. -
Run the following migration script:
./vendor/charcoal/charcoal/build/script/migrate-project
The
migrate-project
script will update all metadata paths in your project's configuration files. Afterwards, it will edit or create a.env
environment variable file with the keyPACKAGES_PATH
set to:vendor/charcoal/charcoal/packages
.This allows the
%packages.path%
string template to expand to the packages location withincharcoal/charcoal
, otherwise it will lead in thevendor
directory.
Option B β If you want to replace all packages with new standalone packages:
- Replace requirements for core packages (
locomotivemtl/charcoal-*
), in yourcomposer.json
file. - Replace requirements for contrib packages (
locomotivemtl/charcoal-contrib-*
), in yourcomposer.json
file, with equivalents fromcharcoal/contrib-*
. - Run
composer require charcoal/config charcoal/coreβ¦
to install the packages. - Run
composer update
to ensure all requirements are up-to-date. - Replace occurrences of
vendor/locomotivemtl/charcoal-*
in your configuration files withvendor/charcoal/*
.
Dependencies
β οΈ Required
- PHP 7.4 or 8.0
βοΈ Configuration
[TODO]
Usage
[TODO]
Development
Development is made in a seperate branch from the main
branch.
β οΈ The
main
branch is protected and doesn't allow pushing changes directly into.
To install the development environment:
composer install
To run the scripts (phplint, phpcs, and phpunit):
composer test
Commit message format
Charcoal uses semantic-release to handle the release process.
It uses the commit messages to determine the consumer impact of changes in the codebase. Following formalized conventions for commit messages, semantic-release automatically determines the next Semantic Version number, generates a changelog, and publishes the release.
The current setup uses the Conventional Commits for commit messages. You can consult it for further information.
This repository is Commitizen friendly and is configured to use the Conventional Commits standard, therfore you can install it globally to ease the process of writting commits.
Alternatively, there is some code editor plugins that can help with the creation of conventional commits:
vscode
phpstrom
Here is an example of release types based on some commit messages:
-
Patch (Fix) release:
fix(pencil): stop graphite breaking when too much pressure applied
-
Minor (Feature) release:
feat(pencil): add 'graphiteWidth' option
-
Major (Breaking) release:
perf(pencil): remove graphiteWidth option BREAKING CHANGE: The graphiteWidth option has been removed. The default graphite width of 10mm is always used for performance reasons.
βπ» Note that the
BREAKING CHANGE:
token must be in the foot of the commit.
Development guidelines
Development should be branch-based and commit messages should following Conventional Commits.
Maintenance and automations
Symplify's MonorepoBuilder is used to handle the
conformity between the core repo and it's packages. It will sync composer.json
files and packages versions.
[TODO] Semantic release config in .releaserc
[TODO] Conventional Commits
[TODO] Commitizen
Development Dependencies
- symplify/monorepo-builder
- Keeps packages versions in sync.
- Config is located in monorepo-builder. It allows to define more dependencies
- semantic-release
- Handle the release process from a Github action.
Development History
This monorepo was created with a many to mono aproach using this guide and tool:
Github Actions
Scripts
create-pr
This script streamlines the process of creating a Pull Request. When your branch is ready to be pulled into the main
or
another [target]
branch, this tool will generate it for you, request review form @charcoalphp/reviewers and add
a beautiful and readable release note generated from the differences between the two breanches.
Documentation
Description
Create a pull request on the github repository on the requested branch.
Default branch: main
Usage
./create-pr
Options
-b, --base The base branch to merge into for the pull request. [Default: main]
-h, --head The branch to compare against the base branch. [Default: The current branch]
Example
# target: the target branch for the pull request. Defaults to [main]
./create-pr -b main -h user:feat-branch
create-release-notes (optional tool)
This script generates release notes on request, returning a changelog based on the requested range of commits
or branches
.
Documentation:
./build/script/create-release-notes --help
Example:
./build/script/create-release-notes -g --from main
Output:
Changes:
Features
- create-pr: add a script to trigger a pull request on the remote (3016115)
Bug Fixes
Contributing
Everyone interacting with Charcoal is expected to follow the code of conduct.
Please see our contribution guide on how to contribute to Charcoal.
If you are tying to report a possible security vulnerability in Charcoal, please see our security policy for more information.
βπ» Authors
- Locomotive π
- Mathieu Ducharme π¨π»βπ»
- Chauncey McAskill π¨π»βπ»
- Joel Alphonso π¨π»βπ»
- Dominic Lord π¨π»βπ»
- Benjamin Roch π¨π»βπ»
π Contributors
Made with contrib.rocks.
Changelog
View CHANGELOG.
The changelog is compliant with Keep a Changelog and is autogenerated from autoreleases.
License
Charcoal is licensed under the MIT license. See LICENSE for details.