Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a runtime for the symfony/runtime component. #1726

Closed

Conversation

GeraudBourdin
Copy link
Contributor

Symfony runtime for SonataPage

Add a SonataPage runtime to avoid custom configuration in the public/index.php

use the configuration above for testing this.

composer require symfony/runtime

public/index.php :


    use App\Kernel;
    
    require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

    return function (array $context) {
        return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
    };

composer.json :

{
    // ... other composer configs ...
    "extra": {
        // ... other composer configs ...
        "runtime": {
            "class": "Sonata\\PageBundle\\Runtime\\SonataPageRuntime",
            "multisite": "host_with_path_by_locale"
        }
    }
}

multisite is not manatory, by default host_with_path_by_locale is selected

Documentation used : https://symfony.com/doc/current/components/runtime.html

Closes #1604

Changelog

### Added
- Some `Sonata\PageBundle\Runtime\SonataPageRuntime` in order to use the symfony runtime component

### Changed

### Deprecated

### Removed

### Fixed

### Security

use the configuration above for testing this.

{
    // ... autres configurations existantes ...
    "extra": {
        // ... other composer configs ...
        "runtime": {
            "class": "Sonata\\PageBundle\\Runtime\\SonataPageRuntime",
            "multisite": "host_with_path_by_locale"
        }
    }
}
Copy link
Member

@VincentLanglet VincentLanglet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please target the stable version 4.x , or is it a BC break ?

composer.json Outdated Show resolved Hide resolved
GeraudBourdin and others added 3 commits November 22, 2023 09:18
use the configuration above for testing this.

{
    // ... autres configurations existantes ...
    "extra": {
        // ... other composer configs ...
        "runtime": {
            "class": "Sonata\\PageBundle\\Runtime\\SonataPageRuntime",
            "multisite": "host_with_path_by_locale"
        }
    }
}
Co-authored-by: Vincent Langlet <[email protected]>
@GeraudBourdin GeraudBourdin changed the base branch from 5.x to 4.x November 22, 2023 08:28
@GeraudBourdin
Copy link
Contributor Author

Please target the stable version 4.x , or is it a BC break ?
Done.

@GeraudBourdin GeraudBourdin changed the base branch from 4.x to 5.x November 22, 2023 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support the new Symfony 5.3 Runtime with multisite host_with_path
2 participants