Help for PHP Developers
Work on Exponential in PHP: the kernel and its classes, autoloads, the command line, Composer, tests and coding standards.
79 pages
Start here
Read these pages in this order.
- PHP Developers: start here Where PHP developers start - what Exponential is as a PHP code base, your first hour, the rules every PHP c...
- Add a database table A migration that creates a table of the site's own on every engine from a share/db_schema.dba definition, w...
- Migrations The start of everything about migrations in Exponential 6.0.15 - schema and content changes written once as...
- Create or change a content class A migration that creates the content class news_article with its attributes and class group, the same way o...
- Change content in bulk A migration that walks every object of a class in batches, publishes a new version of each one that needs t...
- Testing migrations: check, simulate, diff and CI Four layers of tests for migrations - the lint without a database, the dry run, the simulation with a diff...
Good to know
-
Writing migrations in PHP
A hands-on page for PHP developers - the migration class and its namespace, the context API, references between migrations, exceptions and transactions per engine, the kernel APIs a migration uses, one complete example…
-
Migrations
The start of everything about migrations in Exponential 6.0.15 - schema and content changes written once as files under version control and applied to every installation of a site in the same order, with a caption…
-
Migrations: a first PHP migration, step by step
In this tutorial you write two PHP migrations for a site: one creates a table exp_news_note with a first row, the other publishes a folder "News" below the content root and notes it in the table. You check them, look at…
-
PHP migrations
This page is the reference for writing a migration in PHP: the file, the class, the methods the runner calls, what the context gives a migration, transactions, failures, references between migrations, and how to test…
-
Add a database table
A migration that creates a table of the site's own on every engine from a share/db_schema.dba definition, writes a first row, and drops it again in down() - with the dry run, the run, the checks and the rollback.
-
Create or change a content class
A migration that creates the content class news_article with its attributes and class group, the same way on development, staging and production, and the pattern for changing a class (its name, its name pattern) in a…
Search by topic
Each button lists the pages of one topic for PHP Developers.
Key pages
All pages for PHP Developers- Team workflow with git: branches, conflicts and order How several developers write migrations on branches without stepping on each other - timestamps and order, requires for real dependencies...
- Upgrade step or migration? When a change belongs in an upgrade step that exp:upgrade applies to every installation of the kernel or an extension, and when in a migr...
- Coming from Doctrine Migrations For developers who know Doctrine Migrations from Symfony projects - every Doctrine command and class mapped to its Exponential 6 counterp...
- Migrations: frequently asked questions Short answers to the questions people ask about migrations in Exponential 6.0.15 - what they are for, how they differ from upgrades and s...
- Add a column or an index A migration that adds a column with a default and an index to an existing table on every SQL engine, through the engine's own schema hand...
- Add a class attribute A migration that adds the attribute subtitle to the class news_article at the right position, gives every existing object the new field,...
- The PHP developer's reading path Every page of the PHP developers section in a recommended reading order, in six stages from orientation to contributing, with the time ea...
- Fix data A migration that corrects wrong rows - names with stray spaces, addresses over http - with a pure function that the plan, the run and a t...
- Move or rename INI settings A PHP migration that moves settings of an installation's override from site.ini to a file of their own and renames one on the way, keeps...
- Add roles and policies A migration that creates the role News editor with its policies, limits two of them to the class news_article, assigns it to the user gro...
Recently updated
- Autoloads and class maps Updated: The documentation names expcomponents as the kernel's libraries, in English an...
- Composer for PHP developers Updated: The documentation names expcomponents as the kernel's libraries, in English an...
- PHP developer FAQ Updated: The documentation names expcomponents as the kernel's libraries, in English an...
- REST and remote services from PHP Updated: The documentation names expcomponents as the kernel's libraries, in English an...
Related audiences
Free documentation: use it to help yourself and others
This help is free documentation, licensed under the GNU Free Documentation License 1.3 or later. You may use it, share it and improve it:
- Study it Read any page as often as you like, for any purpose.
- Copy it and share it Give pages to other users, on paper or as files. Keep the copyright notice, the license notice and a copy of the license with every copy.
- Translate, adapt and improve it Share your version under the same license, with the original notices and a note of what you changed.
- Cite it Refer to a page by its title and its address in the help, or its file in the doc directory.
- Contribute fixes back Use "Edit on GitHub" on any page. Changes are accepted under the same license, so they stay free for everyone.
Exponential Copyright © 1998-2026 Exponential Foundation and 7x