To 2.4 from 2.3
This version contains few bug fixes from previous release. Here is what you wound need to do:
vendorfolder with latest one. In case you modified something inside the vendor folder, just copy new files instead of overwriting. This version is using the most recent packages (which you can update by running
composer updatebtw) so it is important that you update them so application can work properly (especially for social authentication feature).
Copy new file called
socialauth_callback.phpto your AS root directory.
socialauth.phpfile with the latest one.
Update your social callback url to look like following:
ASEngine/ASCsrf.phpfile to the latest version.
installfolder if you haven't removed it from the app. This will make sure that all future installations of the app work properly.
Make sure that your
ASEngine/ASDatabase.phpfile is up to date with latest version.
ASEngine/ASLang.phpfile to match the latest version.
ASEngine/ASEmail.phpfile to match the latest version.
- Make sure that you have
de.phpfile inside your
Langfolder and then update
templates\languages.phpfile to add German language to the top list of available languages. Also, if you want to display German flag there, you can copy it from the latest version where it is located inside
To 2.3 from 2.2
This update contains a lot of changes comparing to previous version, and in order to properly do the update, I recommend you to go through all files and carefully update them. In case you haven't modified any of AS files, just overwrite everything and there should not be any issues.
Here are some guidelines on how you should perform the update:
vendor folder with latest one. In case you modified something inside the vendor folder, just copy new files instead of overwriting.
Completely replace the
install folder. This is not required if you have app in production, since you won't install it again.
SESSION_REGENERATE_ID constant is removed, and session is regenerated always when some critical actions occur (after successful authentication, after user update his password etc), you can remove the constant from your
Add following constants to
// Name used when emails are sent from your server. // Default is your website name. define('MAIL_FROM_NAME', "your_mail_from_name_here"); // Email used when emails are sent from your server. // The recepients will see this as an email from // which they receive their emails. define('MAIL_FROM_EMAIL', "your_from_email_here");
Copy new classes into ASEngine folder
ASEngine\AS.php file to the latest version
Go through all PHP classes, one by one, and move all dependencies to the constructor. For example, if somewhere inside
ASUser class you have
$validator = new ASValidator(); you will create new
protected $validator; property and move the ASValidator instance to be passed through the constructor (check latest version of
ASUser class). Now, everywhere inside
ASUser class you will use validator instance like
This has to be done with all dependencies in every PHP class that AS has, and the easiest way to find all dependencies is to simply search the file for "new" keyword. This is simple preparation for some future updates that will modernize the code structure and make script testable and easier to maintain.
You should update
assets folder to match the latest version. This basically means that you must copy all new files and folders from latest version, but you don't have to remove old files if you don't want to. Script will just ignore them if they are not included on your pages.
ASLibrary/js folder are not modified.
Copy newly created
js-bootstrap.php file into
Go through all pages (login.php, index.php...) and apply all changes from latest version. If you haven't modified those files, you can just overwrite them.
templates/footer.php to include some common scripts as well as newly created
js-bootstrap.php file that is now used to initialize
$_lang variable and set up jQuery AJAX to send CSRF token automatically. This means that you should now remove
$_lang variable initialization from any other files than