From 6f2f6bfd7a31dbc32321e96ff04dcfc182d85998 Mon Sep 17 00:00:00 2001 From: Nicolas Joubert Date: Thu, 22 Oct 2026 18:39:20 +0200 Subject: [PATCH] #349 - Development tooling and repository files: CONTRIBUTING deprecations, pcov in the Docker image, Makefile, .gitignore, templates, README, LICENSE, composer.json support, dependabot.yml Co-Authored-By: Claude Opus 5.5 (1M context) --- .docker/php/Dockerfile | 7 +++++++ .env.dist | 8 -------- .gitattributes | 1 - .github/ISSUE_TEMPLATE/config.yml | 7 +++++++ .gitignore | 6 ++---- .php-cs-fixer.dist.php | 2 +- CONTRIBUTING.md | 12 +++++++----- LICENSE | 2 +- Makefile | 10 ++++++---- README.md | 4 ++++ composer.json | 6 ++++++ 11 files changed, 41 insertions(+), 24 deletions(-) delete mode 100644 .env.dist diff --git a/.docker/php/Dockerfile b/.docker/php/Dockerfile index 82be215c..a4c0c3ca 100644 --- a/.docker/php/Dockerfile +++ b/.docker/php/Dockerfile @@ -18,6 +18,13 @@ RUN apk update && apk add \ RUN ln -s /usr/share/zoneinfo/Europe/Paris /etc/localtime \ && sed -i "s/^;date.timezone =.*/date.timezone = Europe\/Paris/" $PHP_INI_DIR/php.ini +# pcov, to measure the coverage as the CI (built from its tarball: PECL downloads are unreliable) +RUN apk add --no-cache --virtual .build-deps $PHPIZE_DEPS linux-headers \ + && curl -sSL https://github.com/krakjoe/pcov/archive/refs/tags/v1.0.12.tar.gz | tar xz -C /tmp \ + && cd /tmp/pcov-1.0.12 && phpize && ./configure && make -j"$(nproc)" && make install \ + && docker-php-ext-enable pcov \ + && cd / && rm -rf /tmp/pcov-1.0.12 && apk del .build-deps + COPY --from=composer:2 /usr/bin/composer /usr/bin/composer RUN usermod -u $UID www-data \ diff --git a/.env.dist b/.env.dist deleted file mode 100644 index 7998cb6f..00000000 --- a/.env.dist +++ /dev/null @@ -1,8 +0,0 @@ -# This file contains default values for development environment variables - -# To customize this file, first copy it to `.env` -# Then you can configure variables - -# Set those variables using the values from https://blackfire.io/my/settings/credentials -BLACKFIRE_CLIENT_ID= -BLACKFIRE_CLIENT_TOKEN= diff --git a/.gitattributes b/.gitattributes index 4428b381..3be3eceb 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,4 @@ /.docker export-ignore -/.env.dist export-ignore /.gitattributes export-ignore /.github export-ignore /.gitignore export-ignore diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 0086358d..a7650560 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1 +1,8 @@ blank_issues_enabled: true +contact_links: + - name: Security vulnerability + url: https://github.com/cleverage/process-bundle/security/advisories/new + about: Report a security vulnerability privately, never in a public issue. + - name: Documentation + url: https://github.com/cleverage/process-bundle/blob/main/docs/index.md + about: How to install and use the bundle. diff --git a/.gitignore b/.gitignore index 4eb7427a..9abb697a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,10 @@ /composer.lock /vendor -/vendor-sf3 -/vendor-sf4 -/vendor-sf5 .env .idea /phpunit.xml .phpunit.result.cache .phpunit.cache .php-cs-fixer.cache -coverage-report \ No newline at end of file +/.php-cs-fixer.php +coverage-report diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 4c32dcd3..183a096d 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -27,7 +27,7 @@ return (new PhpCsFixer\Config()) ->setRules([ '@PHP8x2Migration' => true, - '@PHPUnit7x5Migration:risky' => true, + '@PHPUnit10x0Migration:risky' => true, '@Symfony' => true, '@Symfony:risky' => true, 'protected_to_private' => false, diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 84655d97..34998a26 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,11 +50,13 @@ configured accordingly. ## Deprecations notices -When a feature should be deprecated, or when you have a breaking change for a future version, please : +When a feature should be deprecated, or when you have a breaking change for a future version, please: * [Fill an issue](https://github.com/cleverage/process-bundle/issues/new) -* Add TODO comments with the following format: `@TODO deprecated v4.0` -* Trigger a deprecation error: `@trigger_error('This feature will be deprecated in v4.0', E_USER_DEPRECATED);` +* Trigger a deprecation notice with `trigger_deprecation('cleverage/process-bundle', '', '...')` + (`symfony/deprecation-contracts`), `` being the next minor version, and add a `@deprecated` tag stating + the version of the removal (the next major version) +* Describe the deprecation in the CHANGELOG and in `UPGRADE.md` -You can check which deprecation notice is triggered in tests +The tests fail on any deprecation notice (`failOnDeprecation` in `phpunit.xml.dist`): * `make bash` -* `SYMFONY_DEPRECATIONS_HELPER=0 ./vendor/bin/phpunit` +* `vendor/bin/phpunit` diff --git a/LICENSE b/LICENSE index d32c6b75..045d824c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2015-2023 Clever-Age +Copyright (c) Clever-Age Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Makefile b/Makefile index 0a58e32f..8dc089af 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,24 @@ .ONESHELL: SHELL := /bin/bash +.PHONY: start upd up stop down build ps bash logs quality phpstan php-cs-fixer rector tests phpunit + DOCKER_RUN_PHP = docker compose -f .docker/compose.yaml run --rm php "bash" "-c" DOCKER_COMPOSE = docker compose -f .docker/compose.yaml start: upd #[Global] Start application -src/vendor: #[Composer] install dependencies +vendor: composer.json #[Composer] Install dependencies (again when composer.json changes) $(DOCKER_RUN_PHP) "composer install --no-interaction" upd: #[Docker] Start containers detached touch .docker/.env - make src/vendor + $(MAKE) vendor $(DOCKER_COMPOSE) up --remove-orphans --detach up: #[Docker] Start containers touch .docker/.env - make src/vendor + $(MAKE) vendor $(DOCKER_COMPOSE) up --remove-orphans stop: #[Docker] Down containers @@ -31,7 +33,7 @@ build: #[Docker] Build containers ps: # [Docker] Show running containers $(DOCKER_COMPOSE) ps -bash: #[Docker] Connect to php container with current host user +bash: upd #[Docker] Connect to php container with current host user $(DOCKER_COMPOSE) exec php bash logs: #[Docker] Show logs diff --git a/README.md b/README.md index 65e1ffb4..ea0f9494 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,10 @@ CleverAge/ProcessBundle ======================= +[![Test](https://github.com/cleverage/process-bundle/actions/workflows/test.yml/badge.svg)](https://github.com/cleverage/process-bundle/actions/workflows/test.yml) +[![Packagist Version](https://img.shields.io/packagist/v/cleverage/process-bundle)](https://packagist.org/packages/cleverage/process-bundle) +[![License](https://img.shields.io/packagist/l/cleverage/process-bundle)](LICENSE) + This bundle allows to configure series of tasks to be performed on a certain order. Basically, it will greatly ease the configuration of import and exports but can do much more. diff --git a/composer.json b/composer.json index 7de07557..2036d3f0 100644 --- a/composer.json +++ b/composer.json @@ -32,6 +32,12 @@ "role": "Maintainer" } ], + "support": { + "issues": "https://github.com/cleverage/process-bundle/issues", + "source": "https://github.com/cleverage/process-bundle", + "docs": "https://github.com/cleverage/process-bundle/blob/main/docs/index.md", + "security": "https://github.com/cleverage/process-bundle/security/policy" + }, "autoload": { "psr-4": { "CleverAge\\ProcessBundle\\": "src/"