* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ use Symfony\Component\Filesystem\Filesystem; use Symfony\Component\Icu\IcuData; use Symfony\Component\Intl\Intl; use Symfony\Component\Intl\ResourceBundle\Transformer\BundleTransformer; use Symfony\Component\Intl\ResourceBundle\Transformer\Rule\CurrencyBundleTransformationRule; use Symfony\Component\Intl\ResourceBundle\Transformer\Rule\LanguageBundleTransformationRule; use Symfony\Component\Intl\ResourceBundle\Transformer\Rule\LocaleBundleTransformationRule; use Symfony\Component\Intl\ResourceBundle\Transformer\Rule\RegionBundleTransformationRule; use Symfony\Component\Intl\ResourceBundle\Transformer\StubbingContext; require_once __DIR__ . '/common.php'; require_once __DIR__ . '/autoload.php'; if (1 !== $GLOBALS['argc']) { bailout(<<addRule(new LanguageBundleTransformationRule()); $transformer->addRule(new RegionBundleTransformationRule()); $transformer->addRule(new CurrencyBundleTransformationRule()); $transformer->addRule(new LocaleBundleTransformationRule()); echo "Starting stub creation...\n"; $transformer->createStubs($context); echo "Wrote stubs to $targetDir.\n"; $versionFile = $context->getStubDir() . '/version.txt'; file_put_contents($versionFile, "$icuVersionInIcuComponent\n"); echo "Wrote $versionFile.\n"; echo "Done.\n"; echo wordwrap("Please change the Icu component to branch $stubBranch now and run:\n", LINE_WIDTH); echo "\n php copy-stubs-to-component.php\n";