Skip to content

Commit

Permalink
drop support for php 7.4 (openemr#5740)
Browse files Browse the repository at this point in the history
* drop support for php 7.4

* finish laminas console removal

* merge fix

* got import ccda working

* fixes

* one more command done (register) and 2 more left

* fix

* one more command done (zfc-module) and 1 more left

* done

* php syntax ci update

Co-authored-by: stephen waite <[email protected]>
  • Loading branch information
bradymiller and stephenwaite authored Dec 10, 2022
1 parent 8dd17c6 commit 0272c4e
Show file tree
Hide file tree
Showing 26 changed files with 939 additions and 2,882 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/syntax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0', '8.1', '8.2']
php: ['8.0', '8.1', '8.2', '8.3']
name: PHP ${{ matrix.php }}
steps:
- uses: actions/checkout@v2
Expand Down
184 changes: 0 additions & 184 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,98 +11,6 @@ permissions:

jobs:

build_apache_74_106:
name: PHP 7.4 - Apache - MariaDB 10.6
runs-on: ubuntu-20.04
env:
DOCKER_DIR: apache_74_106
OPENEMR_DIR: /var/www/localhost/htdocs/openemr
CHROMIUM_INSTALL: "apk update; apk add --no-cache chromium chromium-chromedriver; export PANTHER_CHROME_DRIVER_BINARY=/usr/lib/chromium/chromedriver"
steps:
- uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Report PHP Version
run: php -v

- name: Install npm package
uses: actions/setup-node@v1
with:
node-version: '16'

- name: Dockers environment start
run: |
source ci/ciLibrary.source
dockers_env_start
- name: Main build
run: |
source ci/ciLibrary.source
composer_github_auth
main_build
- name: CCDA build
run: |
source ci/ciLibrary.source
ccda_build
- name: Install and configure
run: |
source ci/ciLibrary.source
install_configure
- name: Unit testing
run: |
source ci/ciLibrary.source
build_test_unit
if: ${{ success() || failure() }}

- name: E2e testing
run: |
source ci/ciLibrary.source
build_test_e2e
if: ${{ success() || failure() }}

- name: Api testing
run: |
source ci/ciLibrary.source
build_test_api
if: ${{ success() || failure() }}

- name: Fixtures testing
run: |
source ci/ciLibrary.source
build_test_fixtures
if: ${{ success() || failure() }}

- name: Services testing
run: |
source ci/ciLibrary.source
build_test_services
if: ${{ success() || failure() }}

- name: Validators testing
run: |
source ci/ciLibrary.source
build_test_validators
if: ${{ success() || failure() }}

- name: Controllers testing
run: |
source ci/ciLibrary.source
build_test_controllers
if: ${{ success() || failure() }}

- name: Common testing
run: |
source ci/ciLibrary.source
build_test_common
if: ${{ success() || failure() }}

build_apache_80_106:
name: PHP 8.0 - Apache - MariaDB 10.6
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -1023,98 +931,6 @@ jobs:
build_test_common
if: ${{ success() || failure() }}

build_nginx_74:
name: PHP 7.4 - Nginx - MariaDB 10.6
runs-on: ubuntu-20.04
env:
DOCKER_DIR: nginx_74
OPENEMR_DIR: /usr/share/nginx/html/openemr
CHROMIUM_INSTALL: "apt-get update; apt-get install -y chromium-driver; export PANTHER_CHROME_DRIVER_BINARY=/usr/bin/chromedriver"
steps:
- uses: actions/checkout@v2

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'

- name: Report PHP Version
run: php -v

- name: Install npm package
uses: actions/setup-node@v1
with:
node-version: '16'

- name: Dockers environment start
run: |
source ci/ciLibrary.source
dockers_env_start
- name: Main build
run: |
source ci/ciLibrary.source
composer_github_auth
main_build
- name: CCDA build
run: |
source ci/ciLibrary.source
ccda_build
- name: Install and configure
run: |
source ci/ciLibrary.source
install_configure
- name: Unit testing
run: |
source ci/ciLibrary.source
build_test_unit
if: ${{ success() || failure() }}

- name: E2e testing
run: |
source ci/ciLibrary.source
build_test_e2e
if: ${{ success() || failure() }}

- name: Api testing
run: |
source ci/ciLibrary.source
build_test_api
if: ${{ success() || failure() }}

- name: Fixtures testing
run: |
source ci/ciLibrary.source
build_test_fixtures
if: ${{ success() || failure() }}

- name: Services testing
run: |
source ci/ciLibrary.source
build_test_services
if: ${{ success() || failure() }}

- name: Validators testing
run: |
source ci/ciLibrary.source
build_test_validators
if: ${{ success() || failure() }}

- name: Controllers testing
run: |
source ci/ciLibrary.source
build_test_controllers
if: ${{ success() || failure() }}

- name: Common testing
run: |
source ci/ciLibrary.source
build_test_common
if: ${{ success() || failure() }}

build_nginx_8:
name: PHP 8.0 - Nginx - MariaDB 10.6
runs-on: ubuntu-20.04
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ The OpenEMR development docker environment has a very rich advanced feature set.
docker exec -i $(docker ps | grep _openemr | cut -f 1 -d " ") sh -c '/root/devtools register-oauth2-client-demo https://eleven.openemr.io/a/openemr'
```
3. <a name="other_php_versions"></a>Testing other PHP versions.
- The standard `flex` docker used in the easy development environments is PHP 8.1. This can be modified by changing the image (`image: openemr/openemr:flex`) used in the docker-compose.yml script. To use PHP 8.0, then just need to change it to `image: openemr/openemr:flex-3.15-8`. To use PHP 7.4, then just need to change it to `image: openemr/openemr:flex-3.15`.
- The standard `flex` docker used in the easy development environments is PHP 8.1. This can be modified by changing the image (`image: openemr/openemr:flex`) used in the docker-compose.yml script. To use PHP 8.0, then just need to change it to `image: openemr/openemr:flex-3.15-8`.
4. <a name="dev_tools_tests"></a>Php syntax checking, psr12 checking, and automated testing.
- To check PHP error logs:
```sh
Expand Down
47 changes: 47 additions & 0 deletions bin/console
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/usr/bin/php
<?php

/**
* bin/console
*
* @package OpenEMR
* @link https://www.open-emr.org
* @author Brady Miller <Brady Miller <[email protected]>
* @copyright Copyright (c) 2022 Brady Miller <Brady Miller <[email protected]>
* @license https://github.com/openemr/openemr/blob/master/LICENSE GNU General Public License 3
*/

if (php_sapi_name() !== 'cli') {
echo "Only php cli can execute a command\n";
die();
}

$siteDefault = 'default';
foreach ($argv as $arg) {
if (str_contains($arg, "--site=")) {
$siteDefault = explode("=", $arg)[1];
}
}
$_GET['site'] = $siteDefault;

$ignoreAuth = true;
// Since from command line, set $sessionAllowWrite since need to set site_id session and no benefit to set to false
$sessionAllowWrite = true;
require_once __DIR__ . '/../interface/globals.php';

use OpenEMR\Common\Command\AclModify;
use OpenEMR\Common\Command\CcdaNewpatientImport;
use OpenEMR\Common\Command\CcdaNewpatient;
use OpenEMR\Common\Command\CcdaImport;
use OpenEMR\Common\Command\Register;
use OpenEMR\Common\Command\ZfcModule;
use Symfony\Component\Console\Application;

$app = new Application();
$app->add(new AclModify());
$app->add(new CcdaNewpatientImport());
$app->add(new CcdaNewpatient());
$app->add(new CcdaImport());
$app->add(new Register());
$app->add(new ZfcModule());
$app->run();
22 changes: 0 additions & 22 deletions ci/apache_74_106/docker-compose.yml

This file was deleted.

33 changes: 0 additions & 33 deletions ci/nginx_74/docker-compose.yml

This file was deleted.

Loading

0 comments on commit 0272c4e

Please sign in to comment.