<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://sugarclub.sugarai.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Keeping Compatibility</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/838/keeping-compatibility</link><description /><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>Keeping Compatibility</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/838/keeping-compatibility</link><pubDate>Mon, 17 Mar 2025 13:08:01 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:68cdce09-ddb5-4ae9-b982-65323f7339c3</guid><dc:creator>Rafael Fernandes</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/838/keeping-compatibility#comments</comments><description>Current Revision posted to Dev Tutorials by Rafael Fernandes on 3/17/2025 1:08:01 PM&lt;br /&gt;
&lt;div&gt;
&lt;div class="text-base gap-4 md:gap-6 md:max-w-2xl lg:max-w-xl xl:max-w-3xl p-4 md:py-6 flex lg:px-0 m-auto"&gt;
&lt;div class="flex flex-grow flex-col gap-3"&gt;
&lt;div class="markdown prose w-full break-words dark:prose-invert light"&gt;
&lt;p&gt;Ensuring compatibility is crucial for delivering a top-notch product, and with Rector, this can be achieved by configuring Rector Rulesets.&lt;/p&gt;
&lt;p&gt;To adhere to best practices, Sugar advises developers to write their customizations using the latest version of&amp;nbsp;&lt;a href="https://support.sugarcrm.com/Resources/Supported_Platforms/"&gt;Sugar Supported PHP&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&lt;/span&gt;&amp;nbsp;making sure that backward compatibility is maintained using Rector.&lt;/p&gt;
&lt;p&gt;It is important to note that some Sugar customers may still be operating on older versions of Sugar on their on-premise instances, which should be taken into consideration when determining the appropriate PHP version to use for customizations.&lt;/p&gt;
&lt;h1&gt;Recommended Approaches&lt;/h1&gt;
&lt;div class="flex-1 overflow-hidden"&gt;
&lt;div class="react-scroll-to-bottom--css-zghnp-79elbk h-full"&gt;
&lt;div class="react-scroll-to-bottom--css-zghnp-1n7m0yu"&gt;
&lt;div class="flex flex-col pb-9 text-sm"&gt;
&lt;div class="w-full text-token-text-primary" data-testid="conversation-turn-41"&gt;
&lt;div class="px-4 py-2 justify-center text-base md:gap-6 m-auto"&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div class="flex-col gap-1 md:gap-3"&gt;
&lt;div class="flex flex-grow flex-col max-w-full"&gt;
&lt;div data-message-author-role="assistant" data-message-id="56ccaac1-d352-483c-a851-a10298cd4b1a"&gt;
&lt;div class="markdown prose w-full break-words dark:prose-invert dark"&gt;
&lt;p&gt;You have two distinct approaches to ensure the compatibility of your customizations. The recommended method involves coding your customizations in PHP 8.3 and utilizing rector to ensure backward compatibility. Alternatively, you can adopt the second approach by adding configsets to your configuration to address only the breaking changes between versions.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id="mcetoc_1gufh7j020"&gt;Code in PHP8.3 and make it backward compatible by downgrading to PHP 7.4&lt;/h2&gt;
&lt;p&gt;Modify rector.php to make sure that the code is still compatible with PHP 7.4, and replace the &amp;ldquo;&lt;code class="code css-z5oxh7"&gt;UP_TO_PHP_83&lt;/code&gt;&amp;ldquo; and &amp;ldquo;&lt;code class="code css-z5oxh7"&gt;PHP_83&lt;/code&gt;&amp;ldquo; rule sets with 7.4 ones:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    $rectorConfig-&amp;gt;sets([
        \Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_74,
        \Rector\Set\ValueObject\DowngradeSetList::PHP_74,
    ]);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;At this point, you can now follow the&amp;nbsp;&lt;a href="/dev-club/w/dev-tutorials/836/executing-rector"&gt;Execute Rector&lt;/a&gt;&amp;nbsp;making sure you keep git updated so you don&amp;#39;t lose track of what has changed between PHP versions.&lt;/p&gt;
&lt;h2 id="mcetoc_1gufh7j020"&gt;Make upward compatible by refactoring Incompatibilities Only&lt;/h2&gt;
&lt;p&gt;We have provided a configset to enable you to maintain your code compatible from PHP7.4 to PHP8.3 where Rector will only modify your code for breaking changes between those versions.&lt;/p&gt;
&lt;p&gt;You do not need to downgrade and upgrade but just keep your code safely compatible by using either &lt;a href="/dev-club/w/dev-tutorials/834/prepare-rector-for-mlp-addon"&gt;this&lt;/a&gt; or &lt;a href="/dev-club/w/dev-tutorials/837/prepare-rector-for-customizations"&gt;this&lt;/a&gt; configset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Keeping Compatibility</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/838/keeping-compatibility/revision/3</link><pubDate>Tue, 05 Dec 2023 19:20:14 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:68cdce09-ddb5-4ae9-b982-65323f7339c3</guid><dc:creator>Rafael Fernandes</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/838/keeping-compatibility#comments</comments><description>Revision 3 posted to Dev Tutorials by Rafael Fernandes on 12/5/2023 7:20:14 PM&lt;br /&gt;
&lt;div&gt;
&lt;div class="text-base gap-4 md:gap-6 md:max-w-2xl lg:max-w-xl xl:max-w-3xl p-4 md:py-6 flex lg:px-0 m-auto"&gt;
&lt;div class="flex flex-grow flex-col gap-3"&gt;
&lt;div class="markdown prose w-full break-words dark:prose-invert light"&gt;
&lt;p&gt;Ensuring compatibility is crucial for delivering a top-notch product, and with Rector, this can be achieved by configuring Rector Rulesets.&lt;/p&gt;
&lt;p&gt;To adhere to best practices, Sugar advises developers to write their customizations using the latest version of&amp;nbsp;&lt;a href="https://support.sugarcrm.com/Resources/Supported_Platforms/"&gt;Sugar Supported PHP&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&lt;/span&gt;&amp;nbsp;making sure that backward compatibility is maintained using Rector.&lt;/p&gt;
&lt;p&gt;It is important to note that some Sugar customers may still be operating on older versions of Sugar on their on-premise instances, which should be taken into consideration when determining the appropriate PHP version to use for customizations.&lt;/p&gt;
&lt;h1&gt;Recommended Approaches&lt;/h1&gt;
&lt;div class="flex-1 overflow-hidden"&gt;
&lt;div class="react-scroll-to-bottom--css-zghnp-79elbk h-full"&gt;
&lt;div class="react-scroll-to-bottom--css-zghnp-1n7m0yu"&gt;
&lt;div class="flex flex-col pb-9 text-sm"&gt;
&lt;div class="w-full text-token-text-primary" data-testid="conversation-turn-41"&gt;
&lt;div class="px-4 py-2 justify-center text-base md:gap-6 m-auto"&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div class="flex-col gap-1 md:gap-3"&gt;
&lt;div class="flex flex-grow flex-col max-w-full"&gt;
&lt;div data-message-author-role="assistant" data-message-id="56ccaac1-d352-483c-a851-a10298cd4b1a"&gt;
&lt;div class="markdown prose w-full break-words dark:prose-invert dark"&gt;
&lt;p&gt;You have two distinct approaches to ensure the compatibility of your customizations. The recommended method involves coding your customizations in PHP 8.2 and utilizing rector to ensure backward compatibility. Alternatively, you can adopt the second approach by adding configsets to your configuration to address only the breaking changes between versions.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id="mcetoc_1gufh7j020"&gt;Code in PHP8.2 and make it backward compatible by downgrading to PHP 7.4&lt;/h2&gt;
&lt;p&gt;Modify rector.php to make sure that the code is still compatible with PHP 7.4, and replace the &amp;ldquo;&lt;code class="code css-z5oxh7"&gt;UP_TO_PHP_82&lt;/code&gt;&amp;ldquo; and &amp;ldquo;&lt;code class="code css-z5oxh7"&gt;PHP_82&lt;/code&gt;&amp;ldquo; rule sets with 7.4 ones:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    $rectorConfig-&amp;gt;sets([
        \Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_74,
        \Rector\Set\ValueObject\DowngradeSetList::PHP_74,
    ]);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;At this point, you can now follow the&amp;nbsp;&lt;a href="/dev-club/w/dev-tutorials/836/executing-rector"&gt;Execute Rector&lt;/a&gt;&amp;nbsp;making sure you keep git updated so you don&amp;#39;t lose track of what has changed between PHP versions.&lt;/p&gt;
&lt;h2 id="mcetoc_1gufh7j020"&gt;Make upward compatible by refactoring Incompatibilities Only&lt;/h2&gt;
&lt;p&gt;We have provided a configset to enable you to maintain your code compatible from PHP7.4 to PHP8.2 where Rector will only modify your code for breaking changes between those versions.&lt;/p&gt;
&lt;p&gt;You do not need to downgrade and upgrade but just keep your code safely compatible by using either &lt;a href="/dev-club/w/dev-tutorials/834/prepare-rector-for-mlp-addon"&gt;this&lt;/a&gt; or &lt;a href="/dev-club/w/dev-tutorials/837/prepare-rector-for-customizations"&gt;this&lt;/a&gt; configset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Keeping Compatibility</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/838/keeping-compatibility/revision/2</link><pubDate>Thu, 07 Sep 2023 15:33:56 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:68cdce09-ddb5-4ae9-b982-65323f7339c3</guid><dc:creator>Rafael Fernandes</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/838/keeping-compatibility#comments</comments><description>Revision 2 posted to Dev Tutorials by Rafael Fernandes on 9/7/2023 3:33:56 PM&lt;br /&gt;
&lt;div&gt;
&lt;div class="text-base gap-4 md:gap-6 md:max-w-2xl lg:max-w-xl xl:max-w-3xl p-4 md:py-6 flex lg:px-0 m-auto"&gt;
&lt;div&gt;
&lt;div class="flex flex-grow flex-col gap-3"&gt;
&lt;div&gt;
&lt;div class="markdown prose w-full break-words dark:prose-invert light"&gt;
&lt;p&gt;Ensuring compatibility is crucial for delivering a top-notch product, and with Rector, this can be achieved by configuring Rector Rulesets.&lt;/p&gt;
&lt;p&gt;To adhere to best practices, Sugar advises developers to write their customizations using the latest version of&amp;nbsp;&lt;a href="https://support.sugarcrm.com/Resources/Supported_Platforms/"&gt;Sugar Supported PHP&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&lt;/span&gt;&amp;nbsp;making sure that backward compatibility is maintained using Rector.&lt;/p&gt;
&lt;p&gt;It is important to note that some Sugar customers may still be operating on older versions of Sugar on their on-premise instances, which should be taken into consideration when determining the appropriate PHP version to use for customizations.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id="mcetoc_1gufh7j020"&gt;Downgrade to PHP 7.4&lt;/h2&gt;
&lt;p&gt;Modify rector.php to make sure that the code is still compatible with PHP 7.4, and replace the &amp;ldquo;&lt;code class="code css-z5oxh7"&gt;UP_TO_PHP_82&lt;/code&gt;&amp;ldquo; and &amp;ldquo;&lt;code class="code css-z5oxh7"&gt;PHP_82&lt;/code&gt;&amp;ldquo; rule sets with 7.4 ones:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    $rectorConfig-&amp;gt;sets([
        \Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_74,
        \Rector\Set\ValueObject\DowngradeSetList::PHP_74,
    ]);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;At this point, you can now follow the&amp;nbsp;&lt;a href="/dev-club/w/dev-tutorials/836/executing-rector"&gt;Execute Rector&lt;/a&gt;&amp;nbsp;making sure you keep git updated so you don&amp;#39;t loose track of what has changed between PHP versions.&lt;/p&gt;
&lt;h2 id="mcetoc_1gufh7j020"&gt;Incompatibilities Only&lt;/h2&gt;
&lt;p&gt;We have provided a configset to enable you to maintain your code compatible from PHP7.4 to PHP8.2 where Rector will only modify your code for breaking changes between those versions.&lt;/p&gt;
&lt;p&gt;You do not need to downgrade and upgrade but just keep your code safely compatible by using either &lt;a href="/dev-club/w/dev-tutorials/834/prepare-rector-for-mlp-addon"&gt;this&lt;/a&gt; or &lt;a href="/dev-club/w/dev-tutorials/837/prepare-rector-for-customizations"&gt;this&lt;/a&gt; configset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item><item><title>Keeping Compatibility</title><link>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/838/keeping-compatibility/revision/1</link><pubDate>Thu, 20 Apr 2023 14:33:06 GMT</pubDate><guid isPermaLink="false">5c521d64-519d-47a6-9065-134618b211bf:68cdce09-ddb5-4ae9-b982-65323f7339c3</guid><dc:creator>Rafael Fernandes</dc:creator><comments>https://sugarclub.sugarai.com/dev-club/w/dev-tutorials/838/keeping-compatibility#comments</comments><description>Revision 1 posted to Dev Tutorials by Rafael Fernandes on 4/20/2023 2:33:06 PM&lt;br /&gt;

&lt;div&gt;
&lt;div class="text-base gap-4 md:gap-6 md:max-w-2xl lg:max-w-xl xl:max-w-3xl p-4 md:py-6 flex lg:px-0 m-auto"&gt;
&lt;div&gt;
&lt;div class="flex flex-grow flex-col gap-3"&gt;
&lt;div&gt;
&lt;div class="markdown prose w-full break-words dark:prose-invert light"&gt;
&lt;p&gt;Ensuring compatibility is crucial for delivering a top-notch product, and with Rector, this can be achieved by configuring Rector Rulesets.&lt;/p&gt;
&lt;p&gt;To adhere to best practices, Sugar advises developers to write their customizations using the latest version of&amp;nbsp;&lt;a href="https://support.sugarcrm.com/Resources/Supported_Platforms/"&gt;Sugar Supported PHP&lt;/a&gt;&lt;span&gt;&amp;nbsp;and&lt;/span&gt;&amp;nbsp;making sure that backward compatibility is maintained using Rector.&lt;/p&gt;
&lt;p&gt;It is important to note that some Sugar customers may still be operating on older versions of Sugar on their on-premise instances, which should be taken into consideration when determining the appropriate PHP version to use for customizations.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;h2 id="mcetoc_1gufh7j020"&gt;Downgrade to PHP 7.4&lt;/h2&gt;
&lt;p&gt;Modify rector.php to make sure that the code is still compatible with PHP 7.4, and replace the &amp;ldquo;&lt;code class="code css-z5oxh7"&gt;UP_TO_PHP_82&lt;/code&gt;&amp;ldquo; and &amp;ldquo;&lt;code class="code css-z5oxh7"&gt;PHP_82&lt;/code&gt;&amp;ldquo; rule sets with 7.4 ones:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    $rectorConfig-&amp;gt;sets([
        \Rector\Set\ValueObject\DowngradeLevelSetList::DOWN_TO_PHP_74,
        \Rector\Set\ValueObject\DowngradeSetList::PHP_74,
    ]);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;At this point, you can now follow the&amp;nbsp;&lt;a href="/dev-club/w/dev-tutorials/836/executing-rector"&gt;Execute Rector&lt;/a&gt;&amp;nbsp;making sure you keep git updated so you don&amp;#39;t loose track of what has changed between PHP versions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;
</description></item></channel></rss>