Requirements:
- php 8.0+
- ext-gettext
- ext-json
- ext-curl
- ext-gmp
- ext-fileinfo
"propel/propel": "2.0.x-dev",
"symfony/console": "v6.x",
"symfony/finder": "v6.x",
"symfony/translation": "v6.x",
"twig/twig": "3.8.0",
"monolog/monolog": "3.x",
"matthiasmullie/minify": "1.3.71"
Install composer via: GetComposer
composer require psfs/core
./vendor/bin/psfs psfs:create:root
php -S 0.0.0.0:8080 -t ./html
docker-compose up .
Your could use some environment variables to manage the docker containers
- APP_ENVIRONMENT: (local|dev|...|prod) Define the staging for the run environment
- HOST_PORT: 8001 Define the port where you could expose the server
- DEBUG: -xdebug Loads a docker image with xdebug installed and configured, if empty it loads a default php image
RoadMap:
* Framework documentation
- PhpDoc for all files
* Testing
- 100% tests coverage
core's People
core's Issues
Add locale argument to t() function
Allow to send a locale to the translator function t()
. In the CustomTranslateExtension, just check if the argument is not null before setting the locale to get the translation:
self::$locale = I18nHelper::extractLocale(Security::getInstance()->getSessionKey(I18nHelper::PSFS_SESSION_LANGUAGE_KEY));
PSFS doesn't work with [email protected]
Describe the bug
PSFS doesn't work with [email protected]. It fails with error:
PHP Fatal error: Trait 'PSFS\base\types\traits\SingletonTrait' not found in .../vendor/psfs/core/src/base/Logger.php on line 30
Seems something related to the psr-4 section of composer.json of PSFS.
To Reproduce
Steps to reproduce the behavior:
- Install PHP 7.4
- Open any project.
- Run local server.
- Make an API request and see error.
Expected behavior
Local server runs without issues.
Screenshots
Desktop (please complete the following information):
- OS: MacOS Big Sur 11.2.1 M1
Additional context
Admin Panel dropdowns don't work with camelName configuration
Dropdowns for ENUM properties don't work if api.field.case is set as camelName.
Bulk insert
Allow users insert multiple row in one request
Curl in Service
It would be interesting to have methods to get info (curl_getinfo) and errors (curl_error, curl_errno) from the curl connection.
On the other hand, it's a bit confusing headers property in Service because it's used for nothing; it seems to be here to configure headers like CURLOPT_HTTPHEADER but this has to be configured as an option.
[Insight] Files should not be executable
Your project contains files with permissive permissions. In order to avoid opening a security breach, you should restrict execution rights on following files:
- LICENSE
- README.md
- composer.json
- src/Dispatcher.php
- src/autoload.php
- src/base/Logger.php
- src/base/Request.php
- src/base/Router.php
- src/base/Security.php
- src/base/Singleton.php
- src/base/Template.php
- src/base/config/AdminForm.php
- src/base/config/Config.php
- src/base/config/ConfigForm.php
- src/base/config/LoginForm.php
- src/base/config/ModuleForm.php
- src/base/exception/ConfigException.php
- src/base/exception/FormException.php
- src/base/exception/LoggerException.php
- src/base/extension/AssetsNode.php
- src/base/extension/AssetsParser.php
- src/base/extension/AssetsTokenParser.php
- src/base/lib/CssMinifier.php
- src/base/lib/JsMinifier.php
- src/base/types/Controller.php
- src/base/types/Form.php
- src/base/types/interfaces/AuthInterface.php
- src/base/types/interfaces/ControllerInterface.php
- src/bootstrap.php
- src/templates/admin.html.twig
- src/templates/base.html.twig
- src/templates/forms/base.html.twig
- src/templates/forms/button.html.twig
- src/templates/forms/field.html.twig
- src/templates/generator/autoloader.template.twig
- src/templates/generator/controller.template.twig
- src/templates/generator/index.template.twig
- src/templates/index.html.twig
- src/templates/login.html.twig
- src/templates/modules.html.twig
- src/templates/redirect.html.twig
- src/templates/routing.html.twig
- src/templates/welcome.html.twig
chmod a-x 'LICENSE' \
'README.md' \
'composer.json' \
'src/Dispatcher.php' \
'src/autoload.php' \
'src/base/Logger.php' \
'src/base/Request.php' \
'src/base/Router.php' \
'src/base/Security.php' \
'src/base/Singleton.php' \
'src/base/Template.php' \
'src/base/config/AdminForm.php' \
'src/base/config/Config.php' \
'src/base/config/ConfigForm.php' \
'src/base/config/LoginForm.php' \
'src/base/config/ModuleForm.php' \
'src/base/exception/ConfigException.php' \
'src/base/exception/FormException.php' \
'src/base/exception/LoggerException.php' \
'src/base/extension/AssetsNode.php' \
'src/base/extension/AssetsParser.php' \
'src/base/extension/AssetsTokenParser.php' \
'src/base/lib/CssMinifier.php' \
'src/base/lib/JsMinifier.php' \
'src/base/types/Controller.php' \
'src/base/types/Form.php' \
'src/base/types/interfaces/AuthInterface.php' \
'src/base/types/interfaces/ControllerInterface.php' \
'src/bootstrap.php' \
'src/templates/admin.html.twig' \
'src/templates/base.html.twig' \
'src/templates/forms/base.html.twig' \
'src/templates/forms/button.html.twig' \
'src/templates/forms/field.html.twig' \
'src/templates/generator/autoloader.template.twig' \
'src/templates/generator/controller.template.twig' \
'src/templates/generator/index.template.twig' \
'src/templates/index.html.twig' \
'src/templates/login.html.twig' \
'src/templates/modules.html.twig' \
'src/templates/redirect.html.twig' \
'src/templates/routing.html.twig' \
'src/templates/welcome.html.twig'
Posted from SensioLabsInsight
Databases configuration parameters in GeneratorService
Parameters are already written with underscore and they need to be written with point: db_name must be changed to db.name
Do not generate <module>Test.php file when regenerate module.
Check if file exits when generate module and don´t create it.
Form field validations
There's an issue in the function isValid inside src/base/types/Form.php. It's only taken into account the last field in order to validate the form; also the token field is checked twice, one at the beginning of the function and another along with the rest of the fields, so that if the token field is valid, the whole form will be valid.
Service
It'd be interesting that base/Service class allows xml request (apart from json and parameters chain ones) since nowadays it doesn't; going a little bit further, the result is always decoded supposing that it's always returned encoded (json).
Allow to use lowerCamelCase in API responses
Actually API returns JSON objects using UpperCamelCase:
{
"IdAddress": 0,
"Address": "string",
"City": "string",
"Province": "string",
"State": "string",
"PostalCode": "string",
}
It would be nice to have a configuration parameter to use lowerCamelCase instead:
{
"idAddress": 0,
"address": "string",
"city": "string",
"province": "string",
"state": "string",
"postalCode": "string",
}
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.