diff --git a/.github/workflows/phpunit.yml b/.github/workflows/phpunit.yml index 4841336af..4ad7b5532 100644 --- a/.github/workflows/phpunit.yml +++ b/.github/workflows/phpunit.yml @@ -73,8 +73,7 @@ jobs: - name: Run test suite run: | composer dump-autoload -o - curl -ksSfL -o ~/phpunit-9.phar https://phar.phpunit.de/phpunit-9.phar - php ~/phpunit-9.phar + php vendor/bin/phpunit - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 @@ -90,4 +89,4 @@ jobs: GH_REPO: ${{ github.repository }} GH_TOKEN: ${{ github.token }} GH_DEBUG: api - run: gh workflow run rerun.yml -r ${{ github.head_ref || github.ref_name }} -F run_id=${{ github.run_id }} \ No newline at end of file + run: gh workflow run rerun.yml -r ${{ github.head_ref || github.ref_name }} -F run_id=${{ github.run_id }} diff --git a/commonsbooking.php b/commonsbooking.php index c1dd41ee0..cb962aa83 100644 --- a/commonsbooking.php +++ b/commonsbooking.php @@ -43,4 +43,5 @@ require __DIR__.'/vendor/autoload.php'; require __DIR__.'/vendor/cmb2/cmb2/init.php'; require __DIR__.'/vendor/mustardBees/cmb-field-select2/cmb-field-select2.php'; +require __DIR__.'/vendor/ed-itsolutions/cmb2-field-ajax-search/cmb2-field-ajax-search.php'; require_once __DIR__. '/includes/Plugin.php'; diff --git a/composer.json b/composer.json index 47645d4c2..797b4f161 100644 --- a/composer.json +++ b/composer.json @@ -10,12 +10,6 @@ } }, "autoload": { - "files": [ - "includes/Shortcodes.php", - "includes/Template.php", - "includes/TemplateParser.php", - "includes/Users.php" - ], "psr-4": { "CommonsBooking\\": "src/" } @@ -29,12 +23,17 @@ { "type": "vcs", "url": "https://github.com/wielebenwir/cmb-field-select2" + }, + { + "type": "vcs", + "url": "https://github.com/wielebenwir/cmb2-field-ajax-search" } + ], "require": { "php": ">=7.3", "cmb2/cmb2": "^2.10.1", - "mustardbees/cmb-field-select2": "3.0.4", + "mustardbees/cmb-field-select2": "^3.0.4", "geocoder-php/nominatim-provider": "^5.7", "php-http/curl-client": "^2.3", "nyholm/psr7": "^1.8", @@ -45,7 +44,7 @@ "symfony/service-contracts": "^v2.5.2", "eluceo/ical": "~2.14.0", "phpmailer/phpmailer": "^6.8.1", - "ed-itsolutions/cmb2-field-ajax-search": "^2.0" + "ed-itsolutions/cmb2-field-ajax-search": "v2.0.1" }, "require-dev": { "mockery/mockery": "^1.6.6", diff --git a/composer.lock b/composer.lock index de5d5b1a9..239be9349 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "9b9ddc12c9cd547bbad613a8251eceb5", + "content-hash": "3cef4a58c672b31917fae588e87f7e67", "packages": [ { "name": "clue/stream-filter", @@ -74,27 +74,27 @@ }, { "name": "cmb2/cmb2", - "version": "v2.10.1", + "version": "v2.11.0", "source": { "type": "git", "url": "https://github.com/CMB2/CMB2.git", - "reference": "4afc4bb7b92ab6d93aac2247c9a84af773e42532" + "reference": "2847828b5cce1b48d09427ee13e6f7c752704468" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/CMB2/CMB2/zipball/4afc4bb7b92ab6d93aac2247c9a84af773e42532", - "reference": "4afc4bb7b92ab6d93aac2247c9a84af773e42532", + "url": "https://api.github.com/repos/CMB2/CMB2/zipball/2847828b5cce1b48d09427ee13e6f7c752704468", + "reference": "2847828b5cce1b48d09427ee13e6f7c752704468", "shasum": "" }, "require": { - "php": ">5.2.4" + "php": ">7.4" }, "require-dev": { "apigen/apigen": "4.1.2", - "awesomemotive/am-cli-tools": ">=1.3.1", + "awesomemotive/am-cli-tools": ">=1.3.7", "nette/utils": "2.5.3", "phpunit/phpunit": "^6.5", - "yoast/phpunit-polyfills": "^1.0" + "yoast/phpunit-polyfills": "^1.1" }, "suggest": { "composer/installers": "~1.0" @@ -129,32 +129,26 @@ "issues": "https://github.com/CMB2/CMB2/issues", "source": "http://wordpress.org/support/plugin/cmb2" }, - "time": "2022-02-22T14:15:16+00:00" + "time": "2024-04-02T19:30:07+00:00" }, { "name": "ed-itsolutions/cmb2-field-ajax-search", - "version": "v2.0.0", + "version": "v2.0.1", "source": { "type": "git", - "url": "https://github.com/Ed-ITSolutions/cmb2-field-ajax-search.git", - "reference": "9b25b9ece948a2b5e5e79a46df8cbf6197cf8c89" + "url": "https://github.com/wielebenwir/cmb2-field-ajax-search.git", + "reference": "887470a5cb9363a51d573bb8d49259435f519511" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Ed-ITSolutions/cmb2-field-ajax-search/zipball/9b25b9ece948a2b5e5e79a46df8cbf6197cf8c89", - "reference": "9b25b9ece948a2b5e5e79a46df8cbf6197cf8c89", + "url": "https://api.github.com/repos/wielebenwir/cmb2-field-ajax-search/zipball/887470a5cb9363a51d573bb8d49259435f519511", + "reference": "887470a5cb9363a51d573bb8d49259435f519511", "shasum": "" }, "require": { "php": "^5.3.3 || ^7.0" }, "type": "library", - "autoload": { - "files": [ - "cmb2-field-ajax-search.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", "license": [ "GPL-2.0-or-later" ], @@ -168,9 +162,10 @@ ], "description": "CMB2", "support": { - "source": "https://github.com/Ed-ITSolutions/cmb2-field-ajax-search/tree/master" + "source": "https://github.com/wielebenwir/cmb2-field-ajax-search/tree/v2.0.1", + "issues": "https://github.com/wielebenwir/cmb2-field-ajax-search/issues" }, - "time": "2020-07-01T15:35:03+00:00" + "time": "2024-11-01T18:36:49+00:00" }, { "name": "eluceo/ical", @@ -1510,16 +1505,16 @@ }, { "name": "symfony/cache", - "version": "v5.4.40", + "version": "v5.4.46", "source": { "type": "git", "url": "https://github.com/symfony/cache.git", - "reference": "89005bc368ca02ed0433c592e4d27670d0844a66" + "reference": "0fe08ee32cec2748fbfea10c52d3ee02049e0f6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/cache/zipball/89005bc368ca02ed0433c592e4d27670d0844a66", - "reference": "89005bc368ca02ed0433c592e4d27670d0844a66", + "url": "https://api.github.com/repos/symfony/cache/zipball/0fe08ee32cec2748fbfea10c52d3ee02049e0f6b", + "reference": "0fe08ee32cec2748fbfea10c52d3ee02049e0f6b", "shasum": "" }, "require": { @@ -1587,7 +1582,7 @@ "psr6" ], "support": { - "source": "https://github.com/symfony/cache/tree/v5.4.40" + "source": "https://github.com/symfony/cache/tree/v5.4.46" }, "funding": [ { @@ -1603,7 +1598,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:33:22+00:00" + "time": "2024-11-04T11:43:55+00:00" }, { "name": "symfony/cache-contracts", @@ -2061,16 +2056,16 @@ }, { "name": "symfony/var-exporter", - "version": "v5.4.40", + "version": "v5.4.45", "source": { "type": "git", "url": "https://github.com/symfony/var-exporter.git", - "reference": "6a13d37336d512927986e09f19a4bed24178baa6" + "reference": "862700068db0ddfd8c5b850671e029a90246ec75" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-exporter/zipball/6a13d37336d512927986e09f19a4bed24178baa6", - "reference": "6a13d37336d512927986e09f19a4bed24178baa6", + "url": "https://api.github.com/repos/symfony/var-exporter/zipball/862700068db0ddfd8c5b850671e029a90246ec75", + "reference": "862700068db0ddfd8c5b850671e029a90246ec75", "shasum": "" }, "require": { @@ -2114,7 +2109,7 @@ "serialize" ], "support": { - "source": "https://github.com/symfony/var-exporter/tree/v5.4.40" + "source": "https://github.com/symfony/var-exporter/tree/v5.4.45" }, "funding": [ { @@ -2130,7 +2125,7 @@ "type": "tidelift" } ], - "time": "2024-05-31T14:33:22+00:00" + "time": "2024-09-25T14:11:13+00:00" }, { "name": "willdurand/geocoder", @@ -2480,16 +2475,16 @@ }, { "name": "myclabs/deep-copy", - "version": "1.12.0", + "version": "1.12.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c" + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", - "reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/123267b2c49fbf30d78a7b2d333f6be754b94845", + "reference": "123267b2c49fbf30d78a7b2d333f6be754b94845", "shasum": "" }, "require": { @@ -2528,7 +2523,7 @@ ], "support": { "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.12.0" + "source": "https://github.com/myclabs/DeepCopy/tree/1.12.1" }, "funding": [ { @@ -2536,7 +2531,7 @@ "type": "tidelift" } ], - "time": "2024-06-12T14:39:25+00:00" + "time": "2024-11-08T17:47:46+00:00" }, { "name": "nikic/php-parser", @@ -4785,13 +4780,13 @@ ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": {}, "prefer-stable": false, "prefer-lowest": false, "platform": { "php": ">=7.3", "ext-json": "*" }, - "platform-dev": [], + "platform-dev": {}, "plugin-api-version": "2.6.0" } diff --git a/includes/Plugin.php b/includes/Plugin.php index fc1e53f3c..08f0e2f1c 100644 --- a/includes/Plugin.php +++ b/includes/Plugin.php @@ -12,6 +12,12 @@ $cbPlugin = new Plugin(); + +require_once __DIR__ . '/Users.php'; +require_once __DIR__ . '/TemplateParser.php'; +require_once __DIR__ . '/Shortcodes.php'; +require_once __DIR__ . '/Template.php'; + $cbPlugin->init(); $cbPlugin->initRoutes(); $cbPlugin->initBookingcodes(); \ No newline at end of file