egeloen / IvoryCKEditorBundle

Provides a CKEditor integration for your Symfony project.
MIT License
336 stars 114 forks source link

symfony 3.0 deprecated line #258

Closed agrisvv closed 7 years ago

agrisvv commented 7 years ago

The hardcoded value you are using for the $referenceType argument of the Symfony\Component\Routing\Generator\UrlGenerator::generate method is deprecated since version 2.8 and will not be supported anymore in 3.0. Use the constants defined in the UrlGeneratorInterface instead.

(called from CKEditorRenderer.php at line 243)

 if (isset($config[$handler])) {
                $config[$url] = $config[$handler]($this->getRouter());
            } elseif (isset($config[$route])) {
                $config[$url] = $this->getRouter()->generate(
                    $config[$route],
                    isset($config[$routeParameters]) ? $config[$routeParameters] : array(),
                    isset($config[$routeAbsolute])
                        ? $config[$routeAbsolute]
                        : (
                            defined('Symfony\Component\Routing\Generator\UrlGeneratorInterface::ABSOLUTE_PATH')
                                ? UrlGeneratorInterface::ABSOLUTE_PATH
                                : false
                        )
                );
            }
egeloen commented 7 years ago

Hum... What do you mean exactly? Is UrlGeneratorInterface::ABSOLUTE_PATH deprecated? I ask because this code is just here for BC...

agrisvv commented 7 years ago

i currently use 2.8 symfony. and this come up when i use CKEditorType. ok i check bundle config, my be something old config here.

agrisvv commented 7 years ago

Configure like offical documents: http://symfony.com/doc/master/bundles/IvoryCKEditorBundle/usage/file-browse-upload.html if i enable this option when shows deprecate

filebrowserBrowseRouteAbsolute:   true
egeloen commented 7 years ago

@agrisvv Your issue should be fixed by the referenced PR. Can you confirm? Then, I will tag a new release.

agrisvv commented 7 years ago

Thanks, it is fixed - no warnings :)

egeloen commented 7 years ago

Thanks for your feedback. 4.0.6 released!