Skip to content

[Config] Make sure one can build cache on Windows and then run in (Docker) Linux #40877

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

Merged
merged 1 commit into from
Apr 21, 2021

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Apr 19, 2021

Q A
Branch? 5.x
Bug fix? yes
New feature? no
Deprecations? no
Tickets
License MIT
Doc PR

The generated ConfigBuilders should use the \DirectorySeparator constant. The resulting string will look like this:

<?php

namespace Symfony\Config;

require_once __DIR__.\DIRECTORY_SEPARATOR.'Twig'.\DIRECTORY_SEPARATOR.'GlobalConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'Twig'.\DIRECTORY_SEPARATOR.'DateConfig.php';
require_once __DIR__.\DIRECTORY_SEPARATOR.'Twig'.\DIRECTORY_SEPARATOR.'NumberFormatConfig.php';


/**
 * This class is automatically generated to help creating config.
 *
 * @experimental in 5.3
 */
class TwigConfig implements \Symfony\Component\Config\Builder\ConfigBuilderInterface
{
    private $formThemes;

@stof
Copy link
Member

stof commented Apr 19, 2021

or just use / all the time ?

@nicolas-grekas
Copy link
Member

nicolas-grekas commented Apr 20, 2021

or just use / all the time ?

We use DIRECTORY_SEPARATOR also in the dumped container. I think this saves a lookup in the realpath_cache.

See eg #38139

@nicolas-grekas nicolas-grekas added this to the 5.3 milestone Apr 20, 2021
@nicolas-grekas
Copy link
Member

Thank you @Nyholm.

@nicolas-grekas nicolas-grekas merged commit 71c6c42 into symfony:5.x Apr 21, 2021
@Nyholm Nyholm deleted the config-windows branch April 21, 2021 09:11
@Nyholm
Copy link
Member Author

Nyholm commented Apr 21, 2021

Thank you for merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants