Skip to content

Commit

Permalink
Clean the deps & CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ogizanagi committed Dec 14, 2021
1 parent 69f3a71 commit 7db6f59
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 97 deletions.
29 changes: 2 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ jobs:
php: '8.1'
composer-flags: '--prefer-lowest'
allow-unstable: true
#mongodb: true

# Previous Symfony versions
#
Expand All @@ -58,15 +57,12 @@ jobs:
os: 'ubuntu-latest'
php: '8.1'
symfony: '5.4.*@dev'
# For now: Could not install mongodb on PHP 8.1.0-dev
#mongodb: true
allow-unstable: true

- name: 'Test Symfony 5.4 [Windows, PHP 8.1]'
os: 'windows-latest'
php: '8.1'
symfony: '5.4.*@dev'
#mongodb: true
allow-unstable: true

- name: 'Test Symfony 6.0 [Linux, PHP 8.1]'
Expand All @@ -76,13 +72,11 @@ jobs:
allow-unstable: true

# Bleeding edge (unreleased dev versions where failures are allowed)
- name: 'Test next Symfony [Linux, PHP 8.2] (allowed failure)'
- name: 'Test next Symfony [Linux, PHP 8.1] (allowed failure)'
os: 'ubuntu-latest'
php: '8.2'
php: '8.1'
symfony: '6.1.*@dev'
composer-flags: '--ignore-platform-req php'
# For now: Could not install mongodb on PHP 8.1.0-dev
#mongodb: true
allow-unstable: true
allow-failure: true

Expand All @@ -100,19 +94,8 @@ jobs:
with:
php-version: ${{ matrix.php }}
coverage: pcov
extensions: pdo_sqlite ${{ matrix.mongodb && ', mongodb' }}
tools: 'composer:v2,flex'

- name: 'Start MongoDB (Linux)'
uses: supercharge/mongodb-github-action@1.6.0
if: ${{ matrix.mongodb && matrix.os == 'ubuntu-latest' }}

- name: 'Start MongoDB (Windows)'
uses: crazy-max/ghaction-chocolatey@v1
with:
args: install mongodb
if: ${{ matrix.mongodb && matrix.os == 'windows-latest' }}

- name: 'Get composer cache directory'
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
Expand All @@ -128,14 +111,6 @@ jobs:
run: composer config minimum-stability dev
if: ${{ matrix.allow-unstable }}

- name: 'Remove packages not allowing Symfony 6 yet'
run: composer remove --no-update ${{ matrix.composer-flags }} --dev --no-interaction --ansi "nelmio/alice" "api-platform/core"
if: ${{ matrix.symfony == '6.0.*@dev' }}

- name: 'Require Doctrine MongoDB dependencies'
run: composer require --no-update ${{ matrix.composer-flags }} --dev --no-interaction --ansi "doctrine/mongodb-odm:^2.2" "doctrine/mongodb-odm-bundle:^4.3"
if: ${{ matrix.mongodb }}

- name: 'Install dependencies'
run: composer update --prefer-dist ${{ matrix.composer-flags }} --ansi
env:
Expand Down
14 changes: 0 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,30 +27,16 @@ install-54:

install-60: setup
install-60: export SYMFONY_REQUIRE = 6.0.*@dev
install-60: remove-60unready-deps
install-60:
composer config minimum-stability dev
composer update

install-61: setup
install-61: export SYMFONY_REQUIRE = 6.1.*@dev
install-61: remove-60unready-deps
install-61:
composer config minimum-stability dev
composer update

remove-60unready-deps:
# Tmp remove packages not allowing Symfony 6 yet
composer remove --no-update --no-interaction --dev "nelmio/alice" "api-platform/core"

add-odm:
composer require --no-update --no-interaction --dev "doctrine/mongodb-odm:^2.2" "doctrine/mongodb-odm-bundle:^4.3"
@echo "Run again appropriate install target to update dependencies"

remove-odm:
composer remove --no-update --no-interaction --dev "doctrine/mongodb-odm" "doctrine/mongodb-odm-bundle"
@echo "Run again appropriate install target to update dependencies"

########
# Test #
########
Expand Down
24 changes: 2 additions & 22 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,31 +36,11 @@
},
"prefer-stable": true,
"require": {
"php": ">=8.1",
"ext-json": "*",
"symfony/polyfill-php80": "^1.15"
"php": ">=8.1"
},
"require-dev": {
"ext-pdo_sqlite": "*",
"api-platform/core": "^2.5.1",
"doctrine/annotations": "^1.9",
"doctrine/data-fixtures": "^1.2",
"doctrine/doctrine-bundle": "^1.12|^2.0",
"doctrine/orm": "^2.4",
"nelmio/alice": "^3.0",
"symfony/browser-kit": "^5.4|^6.0",
"symfony/console": "^5.4|^6.0",
"symfony/css-selector": "^5.4|^6.0",
"symfony/finder": "^5.4|^6.0",
"symfony/form": "^5.4|^6.0",
"symfony/framework-bundle": "^5.4|^6.0",
"symfony/phpunit-bridge": "^5.4|^6.0",
"symfony/serializer": "^5.4|^6.0",
"symfony/translation": "^5.4|^6.0",
"symfony/twig-bundle": "^5.4|^6.0",
"symfony/validator": "^5.4|^6.0",
"symfony/yaml": "^5.4|^6.0",
"twig/twig": "^2.12|^3.0"
"symfony/phpunit-bridge": "^5.4|^6.0"
},
"extra": {
"branch-alias": {
Expand Down
4 changes: 1 addition & 3 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
colors="true"
bootstrap="tests/bootstrap.php"
bootstrap="vendor/autoload.php"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage>
<include>
Expand All @@ -14,8 +14,6 @@
<env name="SYMFONY_DEPRECATIONS_HELPER" value="max[direct]=0&amp;max[self]=0&amp;max[total]=9999&amp;verbose=1"/>
<env name="SYMFONY_PHPUNIT_REQUIRE" value="phpspec/prophecy-phpunit"/>
<env name="SYMFONY_PHPUNIT_VERSION" value="9.5"/>
<env name="MONGODB_URL" value="mongodb://localhost:27017" />
<env name="MONGODB_DB" value="enum-test" />
</php>
<testsuites>
<testsuite name="Elao Enumerations Test Suite">
Expand Down
31 changes: 0 additions & 31 deletions tests/bootstrap.php

This file was deleted.

0 comments on commit 7db6f59

Please sign in to comment.