Skip to content

Commit

Permalink
Introduce composer plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
veewee committed Jan 3, 2025
1 parent 5a685b3 commit 3953b78
Show file tree
Hide file tree
Showing 10 changed files with 2,614 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,15 @@ jobs:
- name: cargo build
if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest'
run: cargo build --workspace --release --locked --all-targets

- name: Install composer dependencies
if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest'
run: composer install

- name: Validate composer code format
if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest'
run: ./target/release/mago format --dry-run

- name: Lint composer code
if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest'
run: ./target/release/mago lint --reporting-format=github
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/crates/wasm/pkg
/target

/vendor/
24 changes: 24 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "carthage-software/mago",
"description": "Mago is a toolchain for PHP that aims to provide a set of tools to help developers write better code.",
"type": "composer-plugin",
"license": "MIT",
"bin": [
"composer/bin/mago"
],
"autoload": {
"psr-4": {
"Mago\\": "composer/"
}
},
"require": {
"php": "~8.3 || ~8.4",
"composer-plugin-api": "^2.6"
},
"require-dev": {
"composer/composer": "^2.8"
},
"extra": {
"class": "Mago\\MagoPlugin"
}
}
Loading

0 comments on commit 3953b78

Please sign in to comment.