From 66e672de6cca09d1812fb8fce80cf446e941fea3 Mon Sep 17 00:00:00 2001 From: Olivier Laviale Date: Tue, 19 Nov 2024 05:00:52 +0100 Subject: [PATCH] Update boilerplate --- .editorconfig | 8 ++- .gitignore | 2 +- MIGRATION.md => CHANGELOG.md | 2 +- Dockerfile | 56 ++++++++++------- LICENSE | 43 ++++++------- Makefile | 19 +++--- README.md | 26 +++----- composer.json | 105 ++++++++++++++++---------------- docker-compose.yaml | 21 +++---- lib/ConfigBuilder.php | 9 --- lib/ContainerExtension.php | 9 --- lib/Factory.php | 9 --- lib/Hooks.php | 4 +- lib/Record.php | 2 +- phpcs.xml | 2 +- phpstan.neon | 2 +- phpunit.xml | 16 ++--- tests/bootstrap.php | 9 --- tests/lib/Acme/NodeModel.php | 9 --- tests/lib/Acme/SampleRecord.php | 9 --- tests/lib/ActiveRecordTest.php | 12 ---- tests/lib/ConfigBuilderTest.php | 9 --- tests/lib/ContainerTest.php | 13 +--- tests/lib/HooksTest.php | 14 ++--- tests/lib/ServicesTest.php | 2 +- 25 files changed, 158 insertions(+), 254 deletions(-) rename MIGRATION.md => CHANGELOG.md (98%) diff --git a/.editorconfig b/.editorconfig index 33b8d84..c11eed3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,5 +8,11 @@ insert_final_newline = true indent_style = space indent_size = 4 -[{*.yaml,*yml,*.neon}] +[{*.yaml,*.yml,*.neon,*.json}] indent_size = 2 + +[*.md] +max_line_length = 100 + +[{Dockerfile,Makefile}] +indent_style = tab diff --git a/.gitignore b/.gitignore index 14010f5..4edb3d9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -.phpunit.cache +.phpunit.result.cache build composer.lock vendor diff --git a/MIGRATION.md b/CHANGELOG.md similarity index 98% rename from MIGRATION.md rename to CHANGELOG.md index 1b73a6b..ee35921 100644 --- a/MIGRATION.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ ### New Requirements -- PHP 8.1+ +- PHP 8.2+ ### New features diff --git a/Dockerfile b/Dockerfile index 7ea4381..1fe0167 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,30 +1,42 @@ -ARG PHP_VERSION -FROM php:${PHP_VERSION}-cli-buster +ARG PHP_VERSION=8.2 +FROM php:${PHP_VERSION}-cli-bookworm -RUN apt-get update && \ - apt-get install -y autoconf pkg-config && \ - pecl channel-update pecl.php.net && \ - pecl install xdebug && \ - docker-php-ext-enable opcache xdebug +RUN <<-EOF + docker-php-ext-enable opcache -RUN echo '\ -xdebug.client_host=host.docker.internal\n\ -xdebug.mode=develop\n\ -xdebug.start_with_request=yes\n\ -' >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini + if [ "$PHP_VERSION" \< "8.4" ]; then + apt-get update + apt-get install -y autoconf pkg-config + pecl channel-update pecl.php.net + pecl install xdebug + docker-php-ext-enable xdebug + fi +EOF -RUN echo '\ -display_errors=On\n\ -error_reporting=E_ALL\n\ -date.timezone=UTC\n\ -' >> /usr/local/etc/php/conf.d/php.ini +RUN <<-EOF + cat <<-SHELL >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini + xdebug.client_host=host.docker.internal + xdebug.mode=develop + xdebug.start_with_request=yes + SHELL + + cat <<-SHELL >> /usr/local/etc/php/conf.d/php.ini + display_errors=On + error_reporting=E_ALL + date.timezone=UTC + SHELL +EOF ENV COMPOSER_ALLOW_SUPERUSER 1 -RUN apt-get update && \ - apt-get install unzip && \ - curl -s https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer | php -- --quiet && \ - mv composer.phar /usr/local/bin/composer && \ - echo 'export PATH="$HOME/.composer/vendor/bin:$PATH"\n' >> /root/.bashrc +RUN <<-EOF + apt-get update + apt-get install unzip + curl -s https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer | php -- --quiet + mv composer.phar /usr/local/bin/composer + cat <<-SHELL >> /root/.bashrc + export PATH="$HOME/.composer/vendor/bin:$PATH" + SHELL +EOF RUN composer global require squizlabs/php_codesniffer diff --git a/LICENSE b/LICENSE index 82576b9..1e94c4c 100644 --- a/LICENSE +++ b/LICENSE @@ -1,30 +1,21 @@ -icanboogie/bind-activerecord is free software. -It is released under the terms of the following BSD License. +MIT License -Copyright (c) 2015-present by Olivier Laviale -All rights reserved. +Copyright (c) 2015 Olivier LAVIALE -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - - * Neither the name of Olivier Laviale nor the names of its - contributors may be used to endorse or promote products derived from this - software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Makefile b/Makefile index 40819b8..e268707 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,9 @@ # customization -PACKAGE_NAME = icanboogie/bind-activerecord PHPUNIT = vendor/bin/phpunit # do not edit the following lines -.PHONY: usage -usage: - @echo "test: Runs the test suite.\ndoc: Creates the documentation.\nclean: Removes the documentation, the dependencies and the Composer files." - vendor: @composer install @@ -19,7 +14,7 @@ test-dependencies: vendor test-cleanup .PHONY: test test: test-dependencies - @$(PHPUNIT) + @$(PHPUNIT) $(ARGS) .PHONY: test-coverage test-coverage: test-dependencies @@ -36,18 +31,18 @@ test-cleanup: @# nothing .PHONY: test-container -test-container: test-container-81 - -.PHONY: test-container-81 -test-container-81: - @-docker-compose run --rm app81 bash - @docker-compose down -v +test-container: test-container-82 .PHONY: test-container-82 test-container-82: @-docker-compose run --rm app82 bash @docker-compose down -v +.PHONY: test-container-84 +test-container-84: + @-docker-compose run --rm app84 bash + @docker-compose down -v + .PHONY: lint lint: @XDEBUG_MODE=off phpcs -s diff --git a/README.md b/README.md index 548c17e..0f94333 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,7 @@ # bind-activerecord -[![Packagist](https://img.shields.io/packagist/v/icanboogie/bind-activerecord.svg)](https://packagist.org/packages/icanboogie/bind-activerecord) -[![Code Quality](https://img.shields.io/scrutinizer/g/ICanBoogie/bind-activerecord.svg)](https://scrutinizer-ci.com/g/ICanBoogie/bind-activerecord) -[![Code Coverage](https://img.shields.io/coveralls/ICanBoogie/bind-activerecord.svg)](https://coveralls.io/r/ICanBoogie/bind-activerecord) +[![Release](https://img.shields.io/packagist/v/icanboogie/bind-activerecord.svg)](https://packagist.org/packages/icanboogie/bind-activerecord) +[![Code Coverage](https://coveralls.io/repos/github/ICanBoogie/bind-activerecord/badge.svg?branch=6.0)](https://coveralls.io/r/ICanBoogie/bind-activerecord?branch=6.0) [![Downloads](https://img.shields.io/packagist/dt/icanboogie/bind-activerecord.svg)](https://packagist.org/packages/icanboogie/bind-activerecord) The **icanboogie/bind-activerecord** package binds the [icanboogie/activerecord][] package to @@ -39,7 +38,7 @@ $nodes = $app->service_for_class(ModelProvider::class)->model_for_record(Node::c #### Installation -```bash +```shell composer require icanboogie/bind-activerecord ``` @@ -105,31 +104,22 @@ return fn(ConfigBuilder $config) => $config The project is continuously tested by [GitHub actions](https://github.com/ICanBoogie/bind-activerecord/actions). -[![Tests](https://github.com/ICanBoogie/activerecord/workflows/test/badge.svg?branch=master)](https://github.com/ICanBoogie/activerecord/actions?query=workflow%3Atest) -[![Static Analysis](https://github.com/ICanBoogie/activerecord/workflows/static-analysis/badge.svg?branch=master)](https://github.com/ICanBoogie/ActiveRecord/actions?query=workflow%3Astatic-analysis) -[![Code Style](https://github.com/ICanBoogie/activerecord/workflows/code-style/badge.svg?branch=master)](https://github.com/ICanBoogie/activerecord/actions?query=workflow%3Acode-style) +[![Tests](https://github.com/ICanBoogie/bind-activerecord/actions/workflows/test.yml/badge.svg?branch=6.0)](https://github.com/ICanBoogie/bind-activerecord/actions/workflows/test.yml) +[![Static Analysis](https://github.com/ICanBoogie/bind-activerecord/actions/workflows/static-analysis.yml/badge.svg?branch=6.0)](https://github.com/ICanBoogie/bind-activerecord/actions/workflows/static-analysis.yml) +[![Code Style](https://github.com/ICanBoogie/bind-activerecord/actions/workflows/code-style.yml/badge.svg?branch=6.0)](https://github.com/ICanBoogie/bind-activerecord/actions/workflows/code-style.yml) ## Code of Conduct This project adheres to a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in -this project and its community, you are expected to uphold this code. +this project and its community, you're expected to uphold this code. ## Contributing -Please see [CONTRIBUTING](CONTRIBUTING.md) for details. - - - -## License - -**icanboogie/bind-activerecord** is released under the [BSD-3-Clause](LICENSE). - - - +See [CONTRIBUTING](CONTRIBUTING.md) for details. diff --git a/composer.json b/composer.json index 19220f6..4cfeba5 100644 --- a/composer.json +++ b/composer.json @@ -1,55 +1,54 @@ { - "name": "icanboogie/bind-activerecord", - "type": "library", - "description": "Binds ActiveRecord to ICanBoogie", - "homepage": "https://icanboogie.org/", - "license": "BSD-3-Clause", - "authors": [ - { - "name": "Olivier Laviale", - "email": "olivier.laviale@gmail.com", - "homepage": "https://olvlvl.com/", - "role": "Developer" - } - ], - "support": { - "issues": "https://github.com/ICanBoogie/bind-activerecord/issues", - "source": "https://github.com/ICanBoogie/bind-activerecord" - }, - "config": { - "sort-packages": true - }, - "minimum-stability": "dev", - "prefer-stable": true, - "prefer-dist": true, - "require": { - "php": ">=8.1", - "icanboogie/activerecord": "^6.0", - "icanboogie/icanboogie": "^6.0" - }, - "require-dev": { - "phpstan/phpstan": "^1.10", - "phpunit/phpunit": "^10.0" - }, - "autoload": { - "psr-4": { - "ICanBoogie\\Binding\\ActiveRecord\\": "lib" - } - }, - "autoload-dev": { - "psr-4": { - "Test\\ICanBoogie\\Binding\\ActiveRecord\\": "tests/lib" - } - }, - "extra": { - "icanboogie": { - "config-constructor": { - "ICanBoogie\\ActiveRecord\\Config": "ICanBoogie\\Binding\\ActiveRecord\\ConfigBuilder" - }, - "config-path": "config" - } - }, - "scripts": { - "post-autoload-dump": "ICanBoogie\\Autoconfig\\Hooks::on_autoload_dump" - } + "name": "icanboogie/bind-activerecord", + "type": "library", + "description": "Binds ActiveRecord to ICanBoogie", + "homepage": "https://icanboogie.org/", + "license": "MIT", + "authors": [ + { + "name": "Olivier Laviale", + "email": "olivier.laviale@gmail.com", + "homepage": "https://olvlvl.com/", + "role": "Developer" + } + ], + "support": { + "issues": "https://github.com/ICanBoogie/bind-activerecord/issues", + "source": "https://github.com/ICanBoogie/bind-activerecord" + }, + "config": { + "sort-packages": true, + "allow-plugins": { + "icanboogie/autoconfig": true + } + }, + "minimum-stability": "dev", + "prefer-stable": true, + "require": { + "php": ">=8.2", + "icanboogie/activerecord": "^6.0", + "icanboogie/icanboogie": "^6.0" + }, + "require-dev": { + "phpstan/phpstan": "^2.0", + "phpunit/phpunit": "^11.4" + }, + "autoload": { + "psr-4": { + "ICanBoogie\\Binding\\ActiveRecord\\": "lib" + } + }, + "autoload-dev": { + "psr-4": { + "Test\\ICanBoogie\\Binding\\ActiveRecord\\": "tests/lib" + } + }, + "extra": { + "icanboogie": { + "config-constructor": { + "ICanBoogie\\ActiveRecord\\Config": "ICanBoogie\\Binding\\ActiveRecord\\ConfigBuilder" + }, + "config-path": "config" + } + } } diff --git a/docker-compose.yaml b/docker-compose.yaml index 103157d..ec5e146 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,25 +1,24 @@ --- -version: "3.2" services: - app81: + app82: build: context: . args: - PHP_VERSION: 8.1 + PHP_VERSION: "8.2" environment: - PHP_IDE_CONFIG: 'serverName=icanboogie-bind-activerecord' + PHP_IDE_CONFIG: 'serverName=icanboogie-bind-activerecord' volumes: - - .:/app:delegated - - ~/.composer:/root/.composer:delegated + - .:/app:delegated + - ~/.composer:/root/.composer:delegated working_dir: /app - app82: + app84: build: context: . args: - PHP_VERSION: 8.2 + PHP_VERSION: "8.4.0RC4" environment: - PHP_IDE_CONFIG: 'serverName=icanboogie-bind-activerecord' + PHP_IDE_CONFIG: 'serverName=icanboogie-bind-activerecord' volumes: - - .:/app:delegated - - ~/.composer:/root/.composer:delegated + - .:/app:delegated + - ~/.composer:/root/.composer:delegated working_dir: /app diff --git a/lib/ConfigBuilder.php b/lib/ConfigBuilder.php index 4021d7a..29172c4 100644 --- a/lib/ConfigBuilder.php +++ b/lib/ConfigBuilder.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace ICanBoogie\Binding\ActiveRecord; use Closure; diff --git a/lib/ContainerExtension.php b/lib/ContainerExtension.php index a850a65..c2feddc 100644 --- a/lib/ContainerExtension.php +++ b/lib/ContainerExtension.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace ICanBoogie\Binding\ActiveRecord; use ICanBoogie\ActiveRecord\Config; diff --git a/lib/Factory.php b/lib/Factory.php index 7271351..2260606 100644 --- a/lib/Factory.php +++ b/lib/Factory.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace ICanBoogie\Binding\ActiveRecord; use ICanBoogie\ActiveRecord\Config; diff --git a/lib/Hooks.php b/lib/Hooks.php index 8791d34..b5b0530 100644 --- a/lib/Hooks.php +++ b/lib/Hooks.php @@ -39,11 +39,11 @@ public static function active_record_validate(ActiveRecord $record): array|Valid $validate ??= new ActiveRecord\Validate\ValidateActiveRecord(); - return $validate($record); + return $validate($record); // @phpstan-ignore-line false-positive } /** - * Returns the records cache associated with the model. + * Returns the record cache associated with the model. */ public static function model_lazy_get_activerecord_cache(Model $model): RuntimeActiveRecordCache { diff --git a/lib/Record.php b/lib/Record.php index 01f988f..e361cf4 100644 --- a/lib/Record.php +++ b/lib/Record.php @@ -19,7 +19,7 @@ public static function format_service_id(string $activerecord_class): string /** * @param class-string $activerecord_class */ - public function __construct( // @phpstan-ignore-line + public function __construct( public readonly string $activerecord_class, ) { parent::__construct( diff --git a/phpcs.xml b/phpcs.xml index 503ddb6..bdd5e22 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -6,7 +6,7 @@ tests/sandbox/* tests/var/* - + diff --git a/phpstan.neon b/phpstan.neon index 03a60f9..30f4bd7 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,7 +1,7 @@ +# $schema: https://phpstan.olvlvl.com/schema.json parameters: level: max paths: - lib ignoreErrors: - - '#ICanBoogie.+ActiveRecord but does not specify its types#' - '#ICanBoogie.+ActiveRecord.+Model but does not specify its types:#' diff --git a/phpunit.xml b/phpunit.xml index 35e7aff..763ca6c 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,14 +1,16 @@ - + - tests diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 94eb246..e95048f 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace ICanBoogie; chdir(__DIR__); diff --git a/tests/lib/Acme/NodeModel.php b/tests/lib/Acme/NodeModel.php index 7353abe..ebdae28 100644 --- a/tests/lib/Acme/NodeModel.php +++ b/tests/lib/Acme/NodeModel.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\ActiveRecord\Acme; use ICanBoogie\ActiveRecord\Model; diff --git a/tests/lib/Acme/SampleRecord.php b/tests/lib/Acme/SampleRecord.php index bd406f7..57283f0 100644 --- a/tests/lib/Acme/SampleRecord.php +++ b/tests/lib/Acme/SampleRecord.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\ActiveRecord\Acme; use ICanBoogie\ActiveRecord; diff --git a/tests/lib/ActiveRecordTest.php b/tests/lib/ActiveRecordTest.php index be6659b..2feed8f 100644 --- a/tests/lib/ActiveRecordTest.php +++ b/tests/lib/ActiveRecordTest.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\ActiveRecord; use ICanBoogie\Validate\ValidationErrors; @@ -16,9 +7,6 @@ use Test\ICanBoogie\Binding\ActiveRecord\Acme\Article; use Test\ICanBoogie\Binding\ActiveRecord\Acme\SampleRecord; -/** - * @small - */ final class ActiveRecordTest extends TestCase { public function test_validate(): void diff --git a/tests/lib/ConfigBuilderTest.php b/tests/lib/ConfigBuilderTest.php index c379e44..aaff6b6 100644 --- a/tests/lib/ConfigBuilderTest.php +++ b/tests/lib/ConfigBuilderTest.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\ActiveRecord; use ICanBoogie\ActiveRecord\Config; diff --git a/tests/lib/ContainerTest.php b/tests/lib/ContainerTest.php index 39b454e..bdbe8ec 100644 --- a/tests/lib/ContainerTest.php +++ b/tests/lib/ContainerTest.php @@ -1,20 +1,12 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\ActiveRecord; use ICanBoogie\ActiveRecord\Config; use ICanBoogie\ActiveRecord\Connection; use ICanBoogie\ActiveRecord\ConnectionProvider; use ICanBoogie\ActiveRecord\ModelProvider; +use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; use Test\ICanBoogie\Binding\ActiveRecord\Acme\NodeModel; @@ -23,10 +15,9 @@ final class ContainerTest extends TestCase { /** - * @dataProvider provide_service - * * @param class-string $expected_class */ + #[DataProvider('provide_service')] public function test_service(string $id, string $expected_class): void { $this->assertInstanceOf($expected_class, app()->service_for_id($id, $expected_class)); diff --git a/tests/lib/HooksTest.php b/tests/lib/HooksTest.php index 1e1d85f..2e7846a 100644 --- a/tests/lib/HooksTest.php +++ b/tests/lib/HooksTest.php @@ -1,14 +1,5 @@ - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - namespace Test\ICanBoogie\Binding\ActiveRecord; use ICanBoogie\ActiveRecord\ActiveRecordCache; @@ -16,6 +7,7 @@ use ICanBoogie\ActiveRecord\Config\TableDefinition; use ICanBoogie\ActiveRecord\ConnectionProvider; use ICanBoogie\ActiveRecord\ModelCollection; +use ICanBoogie\ActiveRecord\ModelProvider; use ICanBoogie\ActiveRecord\Query; use ICanBoogie\ActiveRecord\SchemaBuilder; use ICanBoogie\Binding\ActiveRecord\Hooks; @@ -31,8 +23,10 @@ final class HooksTest extends TestCase { public function test_should_return_activerecord_cache(): void { + $this->markTestSkipped("ActiveRecord cache is disabled for now"); + $models = $this - ->getMockBuilder(ModelCollection::class) + ->getMockBuilder(ModelProvider::class) ->disableOriginalConstructor() ->getMock(); diff --git a/tests/lib/ServicesTest.php b/tests/lib/ServicesTest.php index 62a7087..0b20757 100644 --- a/tests/lib/ServicesTest.php +++ b/tests/lib/ServicesTest.php @@ -9,7 +9,7 @@ final class ServicesTest extends TestCase { /** - * Asserts {@link BootEvent} was leveraged to configure the static model provider. + * Asserts {@see BootEvent} was leveraged to configure the static model provider. */ public function test_get_model_provider(): void {