diff --git a/.github/workflows/subtree.yml b/.github/workflows/subtree.yml
index 394f1c7cb1e..1e2969a9e3a 100644
--- a/.github/workflows/subtree.yml
+++ b/.github/workflows/subtree.yml
@@ -5,8 +5,11 @@ on:
- v*
branches:
- main
- - 3.1
- - 3.2
+ - '3.1'
+ - '3.2'
+ - '3.3'
+ - '3.4'
+ - '4.0'
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 564ed77d2a1..39e52d12de0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,22 @@
# Changelog
+## v4.0.2
+
+### Bug fixes
+
+* [219199db3](https://github.com/api-platform/core/commit/219199db386cab05f1c1225b889c0a9609b36699) fix(symfony): missing alias to serializer context builder interface (#6643)
+* [5f943e3bb](https://github.com/api-platform/core/commit/5f943e3bb56934ba5d0b858f6b4c20a2985b6b6b) fix(graphql): wrong exception namespace (#6647)
+* [72a0b669a](https://github.com/api-platform/core/commit/72a0b669a426ca4bbbf14cf80a6ced683b947e8c) fix(serializer): remove serializer context builder interface
+* [88bd8c3e1](https://github.com/api-platform/core/commit/88bd8c3e151c843649bcac3feefc2cb956212410) fix(laravel): installation command, fix config overwrites (#6649)
+* [93314b08d](https://github.com/api-platform/core/commit/93314b08de1e6f0505af9e3a3ba3d9971f1ef09c) fix(serializer): allow state's SerializerFilterContextBuilderInterface (#6632)
+* [9a0afc917](https://github.com/api-platform/core/commit/9a0afc917a4bfa824ffbb640af9bb1114a5d31b4) fix(serializer): remove unnecessary dependency
+* [c47e2996e](https://github.com/api-platform/core/commit/c47e2996e51c587c998fde88903703bd6ac9a43c) fix: default format and standard_put values
+* [e327f5f69](https://github.com/api-platform/core/commit/e327f5f69c823c1ed674eefc0eb2551e30fb36bd) fix(symfony): namespace of path segment name generator services (#6642)
+
+Notes:
+
+`standard_put=true` is now the default, you can set it to `false` using `extra_properties.defaults`
+
## v4.0.1
### Bug fixes
@@ -95,6 +112,16 @@
* [0d5f35683](https://github.com/api-platform/core/commit/0d5f356839eb6aa9f536044abe4affa736553e76) feat(laravel): laravel component (#5882)
+## v3.4.1
+
+### Bug fixes
+
+* [219199db3](https://github.com/api-platform/core/commit/219199db386cab05f1c1225b889c0a9609b36699) fix(symfony): missing alias to serializer context builder interface (#6643)
+* [5f943e3bb](https://github.com/api-platform/core/commit/5f943e3bb56934ba5d0b858f6b4c20a2985b6b6b) fix(graphql): wrong exception namespace (#6647)
+* [93314b08d](https://github.com/api-platform/core/commit/93314b08de1e6f0505af9e3a3ba3d9971f1ef09c) fix(serializer): allow state's SerializerFilterContextBuilderInterface (#6632)
+* [9a0afc917](https://github.com/api-platform/core/commit/9a0afc917a4bfa824ffbb640af9bb1114a5d31b4) fix(serializer): remove unnecessary dependency
+* [e327f5f69](https://github.com/api-platform/core/commit/e327f5f69c823c1ed674eefc0eb2551e30fb36bd) fix(symfony): namespace of path segment name generator services (#6642)
+
## v3.4.0
### Deprecations:
diff --git a/src/Laravel/.github/workflows/close_pr.yml b/src/Laravel/.github/workflows/close_pr.yml
new file mode 100644
index 00000000000..72a8ab4325e
--- /dev/null
+++ b/src/Laravel/.github/workflows/close_pr.yml
@@ -0,0 +1,13 @@
+name: Close Pull Request
+
+on:
+ pull_request_target:
+ types: [opened]
+
+jobs:
+ run:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: superbrothers/close-pull-request@v3
+ with:
+ comment: "Thank you for your pull request. However, you have submitted this PR on a read-only sub split of `api-platform/core`. Please submit your PR on the https://github.com/api-platform/core repository.
Thanks!"
diff --git a/src/Laravel/ApiPlatformProvider.php b/src/Laravel/ApiPlatformProvider.php
index d11885ab54f..544980fa9bb 100644
--- a/src/Laravel/ApiPlatformProvider.php
+++ b/src/Laravel/ApiPlatformProvider.php
@@ -1055,6 +1055,10 @@ function (Application $app) {
if ($this->app['config']->get('api-platform.graphql.enabled')) {
$this->registerGraphQl($this->app);
}
+
+ if ($this->app->runningInConsole()) {
+ $this->commands([Console\InstallCommand::class]);
+ }
}
private function registerGraphQl(Application $app): void
@@ -1210,11 +1214,11 @@ public function boot(ResourceNameCollectionFactoryInterface $resourceNameCollect
if ($this->app->runningInConsole()) {
$this->publishes([
__DIR__.'/config/api-platform.php' => $this->app->configPath('api-platform.php'),
- ], 'laravel-assets');
+ ], 'api-platform-config');
$this->publishes([
__DIR__.'/public' => $this->app->publicPath('vendor/api-platform'),
- ], 'laravel-assets');
+ ], ['api-platform-assets', 'public']);
}
$this->loadViewsFrom(__DIR__.'/resources/views', 'api-platform');
diff --git a/src/Laravel/Console/InstallCommand.php b/src/Laravel/Console/InstallCommand.php
new file mode 100644
index 00000000000..ebd48482702
--- /dev/null
+++ b/src/Laravel/Console/InstallCommand.php
@@ -0,0 +1,45 @@
+
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+declare(strict_types=1);
+
+namespace ApiPlatform\Laravel\Console;
+
+use Illuminate\Console\Command;
+use Symfony\Component\Console\Attribute\AsCommand;
+
+#[AsCommand(name: 'api-platform:install')]
+class InstallCommand extends Command
+{
+ /**
+ * @var string
+ */
+ protected $signature = 'api-platform:install';
+
+ /**
+ * @var string
+ */
+ protected $description = 'Install all of the API Platform resources';
+
+ /**
+ * Execute the console command.
+ */
+ public function handle(): void
+ {
+ $this->comment('Publishing API Platform Assets...');
+ $this->callSilent('vendor:publish', ['--tag' => 'api-platform-assets']);
+
+ $this->comment('Publishing API Platform Configuration...');
+ $this->callSilent('vendor:publish', ['--tag' => 'api-platform-config']);
+
+ $this->info('API Platform installed successfully.');
+ }
+}
diff --git a/src/Laravel/README.md b/src/Laravel/README.md
index 4fe1aaa712c..dd8b2d53c6f 100644
--- a/src/Laravel/README.md
+++ b/src/Laravel/README.md
@@ -1,3 +1,12 @@
-# Laravel Integration of API Platform
+# API Platform for Laravel
-Integrates [API Platform](https://api-platform.com) into the [Laravel](https://laravel.com) framework and the Illuminate components.
+Integration of [Laravel](https://laravel.com) and the Illuminate components with the [API Platform](https://api-platform.com) framework.
+
+[Documentation](https://api-platform.com/docs/laravel/)
+
+> [!CAUTION]
+>
+> This is a read-only sub split of `api-platform/core`, please
+> [report issues](https://github.com/api-platform/core/issues) and
+> [send Pull Requests](https://github.com/api-platform/core/pulls)
+> in the [core API Platform repository](https://github.com/api-platform/core).