I am runnig a Symfony 2.8
based webpage which is currently using jQuery 1.11.3
. I would like to update to jQuery 3.2.1
, so I simply changed the import and added the Migration Plugin as well:
// Old
<script src="//code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
// New
<script src="//code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-3.0.0.js"></script>
<script src="//code.jquery.com/ui/1.12.1/jquery-ui.min.js"></script>
My understanding is, that because of the Migration Plugin, there should be no problems with the existing scripts. All incompatibilities or BC breaks between jQuery 1.12 and 3 should be handled by the Plugin. Is that correct?
Indeed everything seems to work fine and the Plugin does not report any problems with my own scripts. So it should be save to remove the Plugin (if I would only use these scripts), right?
However, the Plugin reports several issues which seem to be caused by jQueryUI
, e.g.:
JQMIGRATE: jQuery.expr[":"] is now jQuery.expr.pseudos
migrateWarn @ jquery-migrate-3.0.0.js:62
get @ jquery-migrate-3.0.0.js:75
(anonymous) @ jquery-ui.min.js:6
(anonymous) @ jquery-ui.min.js:6
(anonymous) @ jquery-ui.min.js:6
JQMIGRATE: jQuery.unique is deprecated, use jQuery.uniqueSort
migrateWarn @ jquery-migrate-3.0.0.js:62
get @ jquery-migrate-3.0.0.js:75
i @ jquery-ui.min.js:6
_classes @ jquery-ui.min.js:6
...
If I understand this correctly, jQueryUI
uses some code (jQuery.expr[":"]
) that that should be replaced (jQuery.expr.pseudos
), correct?
So, isn't jQueryUI
compatible to jQuery 3
at all?
I removed the Migration Plugin in everthing still worked fine? How should this be handled? Is this something to worry about or just a warning?
They're warnings, so yes they're something to worry about, but they don't immediately break the code, as you've discovered.
If a feature is deprecated, it means the maintainer plans to remove it in future. The idea is that a deprecation warning gives you time and sufficient warning to alter your code before upgrading again, but doesn't cause you an immediate problem. Documentation, roadmaps and release notes of the project will usually contain information about deprecation and removals as well, so you can plan ahead.
Basically, you're fine for now but should plan to change your code in the medium term to avoid the deprecated functionality.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With