Skip to content

Commit

Permalink
Merge 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Sep 23, 2024
2 parents 034fcbc + 121a328 commit cead16a
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/subtree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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:
Expand Down
13 changes: 13 additions & 0 deletions src/Laravel/.github/workflows/close_pr.yml
Original file line number Diff line number Diff line change
@@ -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.<br><br>Thanks!"
8 changes: 6 additions & 2 deletions src/Laravel/ApiPlatformProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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');
Expand Down
45 changes: 45 additions & 0 deletions src/Laravel/Console/InstallCommand.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?php

/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <[email protected]>
*
* 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.');
}
}
13 changes: 11 additions & 2 deletions src/Laravel/README.md
Original file line number Diff line number Diff line change
@@ -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).

0 comments on commit cead16a

Please sign in to comment.