Monorepo for Pulp packages - a stream-based file processing library for PHP, inspired by Gulp.
- pulp: Core library providing the stream-based processing engine.
- pulp-cache: Generic caching helpers for Pulp pipelines.
- pulp-gtfs: GTFS helpers for generating stops and lines GeoJSON.
- pulp-zip: ZIP archive helpers for Pulp pipelines.
- pulp-geojson: Tools for handling, transforming, and converting GeoJSON data.
- pulp-xml: Handlers for parsing and manipulating XML data.
- pulp-json: Handlers for JSON and JSONP decoding and encoding.
- pulp-geocsv: Utility to convert CSV files with geographic data to GeoJSON.
- pulp-soap: SOAP source handler for Pulp streams.
- pulp-tic: Specialized handlers for parsing Traffic Information Center (TIC) XML data.
- pulp-concert: Specialized handlers for parsing Concert XML data (traffic, parking, etc.).
- geojson-reproject: Utility for re-projecting GeoJSON coordinates.
Install dependencies for all packages from the root:
composer installYou can run tests for each package individually. Navigate to the package directory and run composer test:
cd packages/pulp
composer testTo run tests for all packages that have them, run the following command from the root:
composer testGitHub Actions runs the full test suite on every pull request and push to main across the supported PHP versions: 8.2, 8.3, 8.4, and 8.5. It also runs a non-blocking nightly job so upcoming PHP compatibility issues show up early.
PHPUnit is configured to fail on notices, warnings, deprecations, PHPUnit warnings, and PHPUnit deprecations from the package source. Indirect dependency deprecations are ignored, so third-party internals do not hide Pulp compatibility issues.
To reproduce the supported PHP matrix locally with Docker, run:
bin/test-php-matrixTo run only selected versions, set PHP_VERSIONS:
PHP_VERSIONS="8.4 8.5" bin/test-php-matrixOr run the PHP script directly:
php test.phpRun PHP CS Fixer:
vendor/bin/php-cs-fixer fixRun Rector:
vendor/bin/rector processThis monorepo is set up to automatically split and release packages to separate repositories in the open-mapsight organization on GitHub.
- GitHub Action: The
.github/workflows/release.ymlworkflow runs on every push tomainand every package release tag. - Splitting: It uses the
danharrin/monorepo-split-github-actionto split each directory inpackages/into its own repository. - Main branches: Every push to
mainupdates themainbranch in each split repository. - Package tags: Package releases use scoped monorepo tags in the form
<package>@v<version>(for example,pulp-json@v1.1.0). The workflow strips the package prefix and pushesv<version>to only that package's split repository. - Packagist: Once the split repositories are updated and tagged, Packagist will pick up the new versions.
Use package-scoped tags so each package can follow its own semantic version:
git tag pulp-json@v1.1.0
git push origin pulp-json@v1.1.0This releases mapsight/pulp-json as v1.1.0 without changing the versions of the other packages.
By default, the release script pushes to GitHub (github.com). If you ever need to split to a self-hosted instance (like GitLab), you can set the split-repository-host parameter in the .github/workflows/release.yml file.
- Get your API Token from your Packagist profile.
- Add your Packagist username as a secret named
PACKAGIST_USERand your API Token asPACKAGIST_TOKENin this monorepo's GitHub settings. - The release workflow will then notify Packagist via
curlafter each split.
When adding a package under packages/, make sure the split release target is ready before merging to main:
- Add the package directory: Create
packages/<package-name>with its owncomposer.jsonand README. - Add it to the release matrix: Add
<package-name>to.github/workflows/release.yml. - Create and initialize the target repository: Create
open-mapsight/<package-name>and make sure it has an initializedmainbranch. An empty initial commit is enough; the split action cannot push to a completely empty repository with nomainref. - Grant token access: Make sure the
ACCESS_TOKENPAT used by this monorepo can write to the new target repository. - Set up Packagist: Add the package on Packagist so the release workflow's update notification can refresh it after each split.