All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- nothing
- v(view) option with create-project(new) command
aclInit
command (add table and models creation)new project
(add init-cache after creation)
- add
vlucas/phpdotenv
in composer.json
- config cache first initialization
- Compatibility with Ubiquity 2.5.0
- env vars support
- Change root directory to
public
for async platforms
InstallThemeCmd
pb withDDDManager
- Default vHeader and vFooter templates
- Add create and 2FA views for Auth controllers
- cache initialization pb with
new-model
command
str_pad
usage for questions in commands- relocate livereload starting (after nonce creation)
- add nonce in template files
- add default nonce
- Other models loading +cache re-init in
new-model
command - Re-init cache before migrations commands
- typo in
addRelation
:$namepsace
■ info-migrations [] =>
· Returns the migration infos.
· Aliases : info_migrations,info:migrations,infoMigrations
· Parameters :
-d shortcut of --database
The database offset.
Default : [default]
-o shortcut of --domain
The domain in which the database models are.
× Samples :
Display all migrations for the default database
· Ubiquity info:migrations
■ migrations [] =>
· Display and execute the database migrations.
· Aliases : migrations,migrate
· Parameters :
-d shortcut of --database
The database offset.
Default : [default]
-o shortcut of --domain
The domain in which the database models are.
× Samples :
Display and execute all migrations for the default database
· Ubiquity migrations
■ model [modelName] =>
· Generates models from scratch.
· Aliases : create_model,create:model,create-model,createModel,new_model,new:model,new-model,newModel
· Parameters :
-d shortcut of --database
The database connection to use
Default : [default]
-o shortcut of --domain
The domain in which to create the model.
-k shortcut of --autoincPk
The default primary key defined as autoinc.
Default : [id]
× Samples :
· Ubiquity model User
· Ubiquity model Author -d=projects
· Ubiquity model Group,User -o=orga
- Adds Domain option (
-o
or--domain
) for commands:controller, action, auth, crud-index, model, all-models, dao, rest, rest-api, info-model, info-models, info-validation
- Command names parsing:
For all commands with multiple parts in the name, the following syntaxes can be used:
ex: for
Ubiquity all-models
Ubiquity all_models
Ubiquity all:models
Ubiquity allModels
- assets folder location with Ubiquity server
- Default index page
- ui libraries
index-crud
command
- Application root pb (public folder) with embedded web server
- The regeneration of models preserves the code implemented on the existing models.
- For apache and nginX, root folder is set to public folder (for new projects since Ubiquity 2.4.5)
For an old project (created with a version prior to 2.4.5), you have to modify index.php
and move the index.php
and .htaccess
files to the public
folder.
<?php
define('DS', DIRECTORY_SEPARATOR);
//Updated with index.php in public folder
define('ROOT', __DIR__ . DS . '../app' . DS);
$config = include_once ROOT . 'config/config.php';
require_once ROOT . './../vendor/autoload.php';
require_once ROOT . 'config/services.php';
\Ubiquity\controllers\Startup::run($config);
ubiquity-debug
integration
info::routes
command bug => no routes displayed
- crud & rest commands bug
Call to a member function asAnnotation on null BaseControllerCreator line 58
- Bug on new class command with parent class (inheritance)
newClass
command for creating a new class
- replace
livereloadx
withlivereload
livereloadx has not been updated for 2 years, and does not manage file operations (add, delete).
- add livereload with default php server
Starts php web server and livereload (on 35729 port)
Ubiquity serve
Starts php web server without livereload
Ubiquity serve -n
live-reload
command for dev server
newKey
command for generating the encryption key with Ubiquity-security
- new action problem
Call to a member function asAnnotation() on null
- Add attributes or annotations fix
display-acls
command
- composer for php 8
- add access option (member access) to all-models & create-model cmd
- add db offset param to info:models command
- add OS in version command
- Update client libraries for new projects (Fomantic 2.8.6)
- Fix session name generation pb (only alphanumeric chars)
- Add
create:command
command - support for custom commands
- move utility classes to
ubiquity-commands
repo - Update client libraries for new projects (Fomantic 2.8.5)
- Update client libraries for new projects (Fomantic 2.8.4, jQuery 3.5.1)
- Add port checking for
Ubiquity serve
command
- roadrunner server command (Thanks @Lapinskas)
Ubiquity serve -t=roadrunner
- Mailer commands (mailer, newMail, sendMail)
- opcache preloading in project creation
- set
help
as default command - require php 7.4
- Update client libraries for new projects (Fomantic 2.8, jQuery 3.4.1, phpMv-ui 2.3)
- require php 7.2
- Composer create-project
composer create-project phpmv/ubiquity-project {projectName}
- Cannot set database
- phpMv/ubiquity#72
- Fix https://github.com/phpMv/ubiquity-devtools/commit/c06b6704126a4bf56b2a6a52c60aa1d40edcfcdb
composer
[cmd]
Samples:
Ubiquity composer update
Ubiquity composer nodev
Ubiquity composer optimize
bootstrap
[cmd]
Execute the cmd
method from the .ubiquity/_bootstrap.php
file to prepare an environment.
Sample:
Ubiquity bootstrap prod
Ubiquity bootstrap dev
model
(create-model
) command- added parameter
d
(database
): the database connection name defined in config file (use default connection if absent)
- added parameter
Samples:
Ubiquity model Author -d=projects
Ubiquity model Author --database=projects
all-models
(create-all-models
) command- added parameter
d
(database
): the database connection name defined in config file (use default connection if absent) - removed parameter
b
(dbName
): the database name defined in config file
- added parameter
Samples:
Ubiquity all-models -d=projects
Ubiquity create-all-models --database=projects
- Checks if devtools are globally installed in
sefUpdate
op - Integrates ubiquity-webtools
2.2.0
(in a separate repository)
- Remove warning for
\DS
constant redefinition (thanks @TakeMeNL)
- Ubiquity Swoole server:
Ubiquity serve -t=swoole
- Parameters for
new
command see #45siteUrl (i)
: Sets the site base URL.rewriteBase (e)
: Sets .htaccess file rewriteBase.
Use
Ubiquity new fooProject -i=http://foo.local -w=foo
or
Ubiquity new fooProject --siteUrl=http://foo.local --rewriteBase=foo
- Warning in pages with php Web server Fix: #5
- README.md file for new projects
- ReactPHP server:
Ubiquity serve t=react
- Change of theme without control in the
ct
action ofIndexController
for new projects : see Ubiquity issue #38
- relooking of the messages for clarity
- Fix issue #22 (install without -a option bug)
- Commands
install-theme
for installing Bootstrap, Semantic-UI or Foundationcreate-theme
for creating a new theme (eventually based on a ref theme)
services.tpl file
- An exception is thrown In case of problem with the Database connection (in
DataBase::connect
method) see phpMv/ubiquity#12
The connection to the database must be protected by a
try/catch
inapp/config/services.php
try{
\Ubiquity\orm\DAO::startDatabase($config);
}catch(Exception $e){
echo $e->getMessage();
}
- New commands
Ubiquity restapi
-> create a REST API controller (based on JsonApi)Ubiquity rest
-> create a REST controller associated to a modelUbiquity dao
-> query the database- getOne
- getAll
- uGetOne
- uGetAll
- count
- uCount
- New commands
Ubiquity config
-> display config file variablesUbiquity config:set --database.dbName=blog
-> modify/add and save config variablesUbiquity info:models
-> display all models metadatasUbiquity info:model -m=User
-> display metadatas for the selected modelUbiquity info:validation
-> display validation infos for all models or the selected one
- Project structure (commands are in separate classes).
- services.tpl template for new project creation
- New commands
Ubiquity info:routes
-> display the router informations/test the routes resolution (with -s parameter)
- Project structure (src folder).
- New commands
Ubiquity serve
-> php internal web server for dev