PHPackages                             bugo/smf-compat - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. bugo/smf-compat

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

bugo/smf-compat
===============

Wrappers for global variables and deprecated functions in SMF

0.4(4w ago)1318MITPHPPHP ^8.2CI passing

Since Feb 3Pushed 3w ago1 watchersCompare

[ Source](https://github.com/dragomano/SMF-Compat)[ Packagist](https://packagist.org/packages/bugo/smf-compat)[ Docs](https://github.com/dragomano/smf-compat)[ RSS](/packages/bugo-smf-compat/feed)WikiDiscussions main Synced yesterday

READMEChangelog (10)Dependencies (12)Versions (35)Used By (0)

SMF Compat
==========

[](#smf-compat)

[![SMF 2.1](https://camo.githubusercontent.com/5da4c2bd5bca5db9da7f869df8a929699f7b691d48110cf7b2bf3f8a88459376/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f534d462d322e312d6564363033332e7376673f7374796c653d666c6174)](https://camo.githubusercontent.com/5da4c2bd5bca5db9da7f869df8a929699f7b691d48110cf7b2bf3f8a88459376/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f534d462d322e312d6564363033332e7376673f7374796c653d666c6174)[![PHP](https://camo.githubusercontent.com/7bffcab80be9e1d83d7ec1e72f01342ea9ea17a26347f9b34a8d4a5ae8b58c48/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c75652e7376673f7374796c653d666c6174)](https://camo.githubusercontent.com/7bffcab80be9e1d83d7ec1e72f01342ea9ea17a26347f9b34a8d4a5ae8b58c48/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c75652e7376673f7374796c653d666c6174)[![Coverage](https://camo.githubusercontent.com/70261efdbe967ae95a940f7bf64d933780338be4626209cc37a3536eaa81b2e8/68747470733a2f2f62616467656e2e6e65742f636f766572616c6c732f632f6769746875622f647261676f6d616e6f2f736d662d636f6d7061742f6d61696e)](https://camo.githubusercontent.com/70261efdbe967ae95a940f7bf64d933780338be4626209cc37a3536eaa81b2e8/68747470733a2f2f62616467656e2e6e65742f636f766572616c6c732f632f6769746875622f647261676f6d616e6f2f736d662d636f6d7061742f6d61696e)

[По-русски](README.ru.md)

Description
-----------

[](#description)

This package is designed to prepare existing SMF 2.1 modifications for the upcoming migration to SMF 3.0.

The included utility classes eliminate the need for global variables in your modification code.

As a result, your mods will be compatible with both SMF 2.1 and 3.0 with minimal adjustments.

Installation
------------

[](#installation)

In your modification's root directory, execute:

```
composer require bugo/smf-compat
```

Then, include `autoload.php` in `app.php` (or a similar entry point):

```
require_once __DIR__ . '/vendor/autoload.php';
```

Usage
-----

[](#usage)

### Legacy code

[](#legacy-code)

```
