Skip to content

Commit

Permalink
Merge pull request #10 from netlogix/feature/flow-7
Browse files Browse the repository at this point in the history
FEATURE: Allow Installation with Flow 7.0
  • Loading branch information
stephanschuler authored Feb 1, 2021
2 parents 56c3601 + dbb23ee commit b4c2c59
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 94 deletions.
96 changes: 50 additions & 46 deletions .github/workflows/functionaltests.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,54 @@
name: functionaltests

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
unittests:
name: '[PHP ${{ matrix.php-versions }} | Flow ${{ matrix.flow-versions }}] Functional Tests'
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-versions: [7.2, 7.3, 7.4]
flow-versions: [6.3]

env:
APP_ENV: true
FLOW_CONTEXT: Testing/Functional
FLOW_DIST_FOLDER: flow-base-distribution

steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite
ini-values: opcache.fast_shutdown=0

- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer-
php-${{ matrix.php-versions }}-flow-
- name: Install composer dependencies
run: composer create-project neos/flow-base-distribution ${{ env.FLOW_DIST_FOLDER }} --prefer-dist --no-progress "^${{ matrix.flow-versions }}"

- name: Checkout code
uses: actions/checkout@v2
with:
path: ${{ env.FLOW_DIST_FOLDER }}/DistributionPackages/Netlogix.Sentry

- name: Install netlogix/sentry
run: composer require netlogix/sentry:@dev
working-directory: ${{ env.FLOW_DIST_FOLDER }}

- name: Run tests
run: bin/phpunit -c DistributionPackages/Netlogix.Sentry/phpunit.xml.dist --testsuite="Functional" --bootstrap "Build/BuildEssentials/PhpUnit/FunctionalTestBootstrap.php"
working-directory: ${{ env.FLOW_DIST_FOLDER }}
unittests:
name: '[PHP ${{ matrix.php-version }} | Flow ${{ matrix.flow-version }}] Functional Tests'
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version: [ 7.2, 7.3, 7.4 ]
flow-version: [ 6.3, 7.0 ]
exclude:
# Disable Flow 7.0 on PHP 7.2, as 7.3 is required
- php-version: 7.2
flow-version: 7.0

env:
APP_ENV: true
FLOW_CONTEXT: Testing/Functional
FLOW_DIST_FOLDER: flow-base-distribution

steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite
ini-values: opcache.fast_shutdown=0

- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: php-${{ matrix.php-version }}-flow-${{ matrix.flow-version }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
php-${{ matrix.php-version }}-flow-${{ matrix.flow-version }}-composer-
php-${{ matrix.php-version }}-flow-
- name: Install composer dependencies
run: composer create-project neos/flow-base-distribution ${{ env.FLOW_DIST_FOLDER }} --prefer-dist --no-progress "^${{ matrix.flow-version }}"

- name: Checkout code
uses: actions/checkout@v2
with:
path: ${{ env.FLOW_DIST_FOLDER }}/DistributionPackages/Netlogix.Sentry

- name: Install netlogix/sentry
run: composer require netlogix/sentry:@dev
working-directory: ${{ env.FLOW_DIST_FOLDER }}

- name: Run tests
run: bin/phpunit -c DistributionPackages/Netlogix.Sentry/phpunit.xml.dist --testsuite="Functional" --bootstrap "Build/BuildEssentials/PhpUnit/FunctionalTestBootstrap.php"
working-directory: ${{ env.FLOW_DIST_FOLDER }}
96 changes: 50 additions & 46 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -1,50 +1,54 @@
name: unittests

on: [push, pull_request]
on: [ push, pull_request ]

jobs:
unittests:
name: '[PHP ${{ matrix.php-versions }} | Flow ${{ matrix.flow-versions }}] Unit Tests'
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-versions: [7.2, 7.3, 7.4]
flow-versions: [6.3]

env:
APP_ENV: true
FLOW_CONTEXT: Testing/Unit
FLOW_DIST_FOLDER: flow-base-distribution

steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite
ini-values: opcache.fast_shutdown=0

- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
php-${{ matrix.php-versions }}-flow-${{ matrix.flow-versions }}-composer-
php-${{ matrix.php-versions }}-flow-
- name: Install composer dependencies
run: composer create-project neos/flow-base-distribution ${{ env.FLOW_DIST_FOLDER }} --prefer-dist --no-progress "^${{ matrix.flow-versions }}"

- name: Checkout code
uses: actions/checkout@v2
with:
path: ${{ env.FLOW_DIST_FOLDER }}/DistributionPackages/Netlogix.Sentry

- name: Install netlogix/sentry
run: composer require netlogix/sentry:@dev
working-directory: ${{ env.FLOW_DIST_FOLDER }}

- name: Run tests
run: bin/phpunit -c DistributionPackages/Netlogix.Sentry/phpunit.xml.dist --testsuite="Unit" --bootstrap "Build/BuildEssentials/PhpUnit/UnitTestBootstrap.php"
working-directory: ${{ env.FLOW_DIST_FOLDER }}
unittests:
name: '[PHP ${{ matrix.php-version }} | Flow ${{ matrix.flow-version }}] Unit Tests'
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php-version: [ 7.2, 7.3, 7.4 ]
flow-version: [ 6.3, 7.0 ]
exclude:
# Disable Flow 7.0 on PHP 7.2, as 7.3 is required
- php-version: 7.2
flow-version: 7.0

env:
APP_ENV: true
FLOW_CONTEXT: Testing/Unit
FLOW_DIST_FOLDER: flow-base-distribution

steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite
ini-values: opcache.fast_shutdown=0

- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: ~/.composer/cache
key: php-${{ matrix.php-version }}-flow-${{ matrix.flow-version }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
php-${{ matrix.php-version }}-flow-${{ matrix.flow-version }}-composer-
php-${{ matrix.php-version }}-flow-
- name: Install composer dependencies
run: composer create-project neos/flow-base-distribution ${{ env.FLOW_DIST_FOLDER }} --prefer-dist --no-progress "^${{ matrix.flow-version }}"

- name: Checkout code
uses: actions/checkout@v2
with:
path: ${{ env.FLOW_DIST_FOLDER }}/DistributionPackages/Netlogix.Sentry

- name: Install netlogix/sentry
run: composer require netlogix/sentry:@dev
working-directory: ${{ env.FLOW_DIST_FOLDER }}

- name: Run tests
run: bin/phpunit -c DistributionPackages/Netlogix.Sentry/phpunit.xml.dist --testsuite="Unit" --bootstrap "Build/BuildEssentials/PhpUnit/UnitTestBootstrap.php"
working-directory: ${{ env.FLOW_DIST_FOLDER }}
2 changes: 1 addition & 1 deletion Classes/ThrowableStorage/CompoundStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function setBacktraceRenderer(\Closure $backtraceRenderer)

private function createStorage(string $storageClassName): ThrowableStorageInterface
{
assert($storageClassName instanceof ThrowableStorageInterface);
assert(is_a($storageClassName, ThrowableStorageInterface::class, true));
$bootstrap = Bootstrap::$staticObjectManager->get(Bootstrap::class);
$configurationManager = $bootstrap->getEarlyInstance(ConfigurationManager::class);
$settings = $configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'Neos.Flow');
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ configure and extend this package to fit your needs.
Currently the following Flow versions are supported:

* `^6.3`
* `^7.0`

## Setup

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"license": "MIT",
"require": {
"php": "^7.2",
"neos/flow": "^6.3",
"neos/flow": "^6.3 || ^7.0",
"sentry/sdk": "^3.1"
},
"autoload": {
Expand Down

0 comments on commit b4c2c59

Please sign in to comment.