Skip to content

Commit

Permalink
Merge pull request #16586 from phalcon/5.0.x
Browse files Browse the repository at this point in the history
5.7.0
  • Loading branch information
niden committed May 17, 2024
2 parents 6cedc11 + 041897a commit 03653b4
Show file tree
Hide file tree
Showing 48 changed files with 1,490 additions and 1,180 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:

env:
# All versions should be declared here
PHALCON_VERSION: 5.6.2
PHALCON_VERSION: 5.7.0
ZEPHIR_PARSER_VERSION: 1.6.0

# For tests
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ ext/run-tests.php
*.deps
.ci/lemon

# local tests
.local/

.libs/
autom4te.cache/
/vendor
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG-5.0.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## [5.7.0](https://github.com/phalcon/cphalcon/releases/tag/v5.7.0) (2024-05-17)

### Changed

- Changed `Phalcon\Support\HelperFactory` to use the internal mapper for better memory management [#16571](https://github.com/phalcon/cphalcon/issues/16571)

### Added

- New ini setting `phalcon.form.strict_entity_property_check` for `Phalcon\Forms\Form` to enable strict entity property checking. [#16567](https://github.com/phalcon/cphalcon/issues/16567)

### Fixed

- Fixed `Phalcon\Mvc\Cli\Router` to extend the `Phalcon\Mvc\Cli\RouterInterface` [#16551](https://github.com/phalcon/cphalcon/issues/16551)
- Fixed `Phalcon\Filter\Validation\Validator\StringLength::validate()` to correctly use the `include` parameter [#16560](https://github.com/phalcon/cphalcon/issues/16560)
- Fixed `Phalcon\Db\Column::TYPE_BINARY` and `Phalcon\Db\Column::TYPE_TINYINTEGER` to have unique values [#16532](https://github.com/phalcon/cphalcon/issues/16532)
- Fixed `Phalcon\Forms\Form` to bind only existing properties on entities, based on `phalcon.form.strict_entity_property_check` setting. [#16567](https://github.com/phalcon/cphalcon/issues/16567)
- Fixed `Phalcon\Filter\Sanitize\BoolVal` to correctly handle integers. [#16582](https://github.com/phalcon/cphalcon/issues/16582)

### Removed

## [5.6.2](https://github.com/phalcon/cphalcon/releases/tag/v5.6.1) (2024-03-14)

### Changed
Expand Down
7 changes: 3 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,12 @@ We use the GitHub issues for tracking bugs and feature requests and have limited

_Please use the [Documentation](https://phalcon.io/docs) before anything else. You can also use the search feature in our documents to find what you are looking for. If your question is still not answered, there are more options below._

* Questions should go to [Official Forums](https://phalcon.io/forum)
* Questions should go to [GitHub Discussions](https://phalcon.io/discussions)
* Another way is to ask a question on [Stack Overflow](https://stackoverflow.com/) and tag it with
[`phalcon`](https://stackoverflow.com/questions/tagged/phalcon)
* Come join the Phalcon [Discord](https://phalcon.io/discord)
* Our social network accounts are:
* [Telegram](https://phalcon.io/telegram)
* [Parler](https://phalcon.io/parler)
* [Gab](https://phalcon.io/gab)
* [MeWe](https://phalcon.io/mewe)
* [Twitter](https://phalcon.io/t)
Expand All @@ -42,13 +41,13 @@ Please report bugs when you've exhausted all of the above options.

* Don't submit your pull requests to the `master` branch. Branch from the required branch and, if needed, rebase to the proper branch before submitting your pull request. If it doesn't merge cleanly with master you may be asked to rebase your changes
* Don't put submodule updates in your pull request unless they are to landed commits
* Add tests relevant to the fixed bug or new feature. Test classes should follow the [PSR-2 coding style guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). See our [testing guide](https://github.com/phalcon/cphalcon/blob/master/tests/README.md) for more information
* Add tests relevant to the fixed bug or new feature. Test classes should follow the [PSR-12 coding style guide](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-12-coding-style-guide.md).
* Phalcon is written in [Zephir](https://zephir-lang.com/), please do not submit commits that modify C generated files directly or those whose functionality/fixes are implemented in the C programming language
* Remove any change to `ext/kernel`, `*.zep.c` and `*.zep.h` files before submitting the pull request

## Requesting Features

If you have a change or new feature in mind, please fill a [NFR](https://docs.phalcon.io/latest/new-feature-request) on the GitHub. Alternatively you may also request features via [the FeatHub page](https://feathub.com/phalcon/cphalcon).
If you have a change or new feature in mind, please fill a [NFR](https://docs.phalcon.io/latest/new-feature-request) on the GitHub.


Thanks!
Expand Down
999 changes: 526 additions & 473 deletions build/phalcon/phalcon.zep.c

Large diffs are not rendered by default.

317 changes: 157 additions & 160 deletions build/phalcon/phalcon.zep.h

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion build/phalcon/php_phalcon.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ typedef zend_function zephir_fcall_cache_entry;


#define PHP_PHALCON_NAME "phalcon"
#define PHP_PHALCON_VERSION "5.6.2"
#define PHP_PHALCON_VERSION "5.7.0"
#define PHP_PHALCON_EXTNAME "phalcon"
#define PHP_PHALCON_AUTHOR "Phalcon Team and contributors"
#define PHP_PHALCON_ZEPVERSION "0.18.0-$Id$"
Expand All @@ -114,6 +114,10 @@ typedef struct _zephir_struct_db {
zend_bool force_casting;
} zephir_struct_db;

typedef struct _zephir_struct_form {
zend_bool strict_entity_property_check;
} zephir_struct_form;

typedef struct _zephir_struct_orm {
HashTable* ast_cache;
int cache_level;
Expand Down Expand Up @@ -161,6 +165,7 @@ ZEND_BEGIN_MODULE_GLOBALS(phalcon)


zephir_struct_db db;
zephir_struct_form form;
zephir_struct_orm orm;
zephir_struct_warning warning;

Expand Down
6 changes: 5 additions & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "phalcon",
"description": "Phalcon is a full stack PHP framework, delivered as a PHP extension, offering lower resource consumption and high performance.",
"author": "Phalcon Team and contributors",
"version": "5.6.2",
"version": "5.7.0",
"verbose": false,
"stubs": {
"path": "ide\/%version%\/%namespace%\/",
Expand Down Expand Up @@ -69,6 +69,10 @@
"type": "bool",
"default": false
},
"form.strict_entity_property_check": {
"type": "bool",
"default": false
},
"orm.ast_cache": {
"type": "hash",
"default": "NULL"
Expand Down
4 changes: 2 additions & 2 deletions ext/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ if test "$PHP_PHALCON" = "yes"; then
phalcon/html/link/interfaces/linkinterface.zep.c
phalcon/html/link/interfaces/linkproviderinterface.zep.c
phalcon/logger/adapter/adapterinterface.zep.c
phalcon/mvc/model/resultsetinterface.zep.c
phalcon/paginator/adapter/adapterinterface.zep.c
phalcon/translate/adapter/adapterinterface.zep.c
phalcon/annotations/adapter/abstractadapter.zep.c
Expand All @@ -69,6 +68,7 @@ if test "$PHP_PHALCON" = "yes"; then
phalcon/logger/formatter/formatterinterface.zep.c
phalcon/mvc/model/behaviorinterface.zep.c
phalcon/mvc/model/exception.zep.c
phalcon/mvc/model/resultsetinterface.zep.c
phalcon/mvc/view/engine/engineinterface.zep.c
phalcon/mvc/viewbaseinterface.zep.c
phalcon/paginator/adapter/abstractadapter.zep.c
Expand Down Expand Up @@ -112,6 +112,7 @@ if test "$PHP_PHALCON" = "yes"; then
phalcon/cache/abstractcache.zep.c
phalcon/cli/dispatcherinterface.zep.c
phalcon/cli/router/routeinterface.zep.c
phalcon/cli/routerinterface.zep.c
phalcon/cli/taskinterface.zep.c
phalcon/datamapper/pdo/connectionlocatorinterface.zep.c
phalcon/datamapper/pdo/profiler/profilerinterface.zep.c
Expand Down Expand Up @@ -229,7 +230,6 @@ if test "$PHP_PHALCON" = "yes"; then
phalcon/cli/router.zep.c
phalcon/cli/router/exception.zep.c
phalcon/cli/router/route.zep.c
phalcon/cli/routerinterface.zep.c
phalcon/cli/task.zep.c
phalcon/config/adapter/grouped.zep.c
phalcon/config/adapter/ini.zep.c
Expand Down
4 changes: 2 additions & 2 deletions ext/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if (PHP_PHALCON != "no") {
ADD_SOURCES(configure_module_dirname + "/phalcon/assets", "assetinterface.zep.c filterinterface.zep.c asset.zep.c inline.zep.c collection.zep.c exception.zep.c manager.zep.c", "phalcon");
ADD_SOURCES(configure_module_dirname + "/phalcon/cache/adapter", "adapterinterface.zep.c apcu.zep.c libmemcached.zep.c memory.zep.c redis.zep.c stream.zep.c weak.zep.c", "phalcon");
ADD_SOURCES(configure_module_dirname + "/phalcon/config", "configinterface.zep.c config.zep.c configfactory.zep.c exception.zep.c", "phalcon");
ADD_SOURCES(configure_module_dirname + "/phalcon/mvc/model", "metadatainterface.zep.c metadata.zep.c resultsetinterface.zep.c behaviorinterface.zep.c exception.zep.c behavior.zep.c resultinterface.zep.c resultset.zep.c binderinterface.zep.c criteriainterface.zep.c managerinterface.zep.c queryinterface.zep.c relationinterface.zep.c transactioninterface.zep.c binder.zep.c criteria.zep.c manager.zep.c query.zep.c relation.zep.c row.zep.c transaction.zep.c validationfailed.zep.c", "phalcon");
ADD_SOURCES(configure_module_dirname + "/phalcon/mvc/model", "metadatainterface.zep.c metadata.zep.c behaviorinterface.zep.c exception.zep.c resultsetinterface.zep.c behavior.zep.c resultinterface.zep.c resultset.zep.c binderinterface.zep.c criteriainterface.zep.c managerinterface.zep.c queryinterface.zep.c relationinterface.zep.c transactioninterface.zep.c binder.zep.c criteria.zep.c manager.zep.c query.zep.c relation.zep.c row.zep.c transaction.zep.c validationfailed.zep.c", "phalcon");
ADD_SOURCES(configure_module_dirname + "/phalcon/datamapper/query", "abstractquery.zep.c abstractconditions.zep.c bind.zep.c delete.zep.c insert.zep.c queryfactory.zep.c select.zep.c update.zep.c", "phalcon");
ADD_SOURCES(configure_module_dirname + "/phalcon/db/adapter", "adapterinterface.zep.c abstractadapter.zep.c pdofactory.zep.c", "phalcon");
ADD_SOURCES(configure_module_dirname + "/phalcon/annotations/adapter", "adapterinterface.zep.c abstractadapter.zep.c apcu.zep.c memory.zep.c stream.zep.c", "phalcon");
Expand Down Expand Up @@ -64,7 +64,7 @@ if (PHP_PHALCON != "no") {
ADD_SOURCES(configure_module_dirname + "/phalcon/translate/interpolator", "interpolatorinterface.zep.c associativearray.zep.c indexedarray.zep.c", "phalcon");
ADD_SOURCES(configure_module_dirname + "/phalcon/acl", "componentinterface.zep.c roleinterface.zep.c component.zep.c componentawareinterface.zep.c enum.zep.c exception.zep.c role.zep.c roleawareinterface.zep.c", "phalcon");
ADD_SOURCES(configure_module_dirname + "/phalcon/annotations", "readerinterface.zep.c annotation.zep.c annotationsfactory.zep.c collection.zep.c exception.zep.c reader.zep.c reflection.zep.c", "phalcon");
ADD_SOURCES(configure_module_dirname + "/phalcon/cli", "dispatcherinterface.zep.c taskinterface.zep.c console.zep.c dispatcher.zep.c router.zep.c routerinterface.zep.c task.zep.c", "phalcon");
ADD_SOURCES(configure_module_dirname + "/phalcon/cli", "dispatcherinterface.zep.c routerinterface.zep.c taskinterface.zep.c console.zep.c dispatcher.zep.c router.zep.c task.zep.c", "phalcon");
ADD_SOURCES(configure_module_dirname + "/phalcon/cli/router", "routeinterface.zep.c exception.zep.c route.zep.c", "phalcon");
ADD_SOURCES(configure_module_dirname + "/phalcon/datamapper/pdo", "connectionlocatorinterface.zep.c connection.zep.c connectionlocator.zep.c", "phalcon");
ADD_SOURCES(configure_module_dirname + "/phalcon/datamapper/pdo/profiler", "profilerinterface.zep.c memorylogger.zep.c profiler.zep.c", "phalcon");
Expand Down
10 changes: 6 additions & 4 deletions ext/phalcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ zend_class_entry *phalcon_db_dialectinterface_ce;
zend_class_entry *phalcon_html_link_interfaces_linkinterface_ce;
zend_class_entry *phalcon_html_link_interfaces_linkproviderinterface_ce;
zend_class_entry *phalcon_logger_adapter_adapterinterface_ce;
zend_class_entry *phalcon_mvc_model_resultsetinterface_ce;
zend_class_entry *phalcon_paginator_adapter_adapterinterface_ce;
zend_class_entry *phalcon_translate_adapter_adapterinterface_ce;
zend_class_entry *phalcon_assets_filterinterface_ce;
Expand All @@ -56,6 +55,7 @@ zend_class_entry *phalcon_flash_flashinterface_ce;
zend_class_entry *phalcon_image_adapter_adapterinterface_ce;
zend_class_entry *phalcon_logger_formatter_formatterinterface_ce;
zend_class_entry *phalcon_mvc_model_behaviorinterface_ce;
zend_class_entry *phalcon_mvc_model_resultsetinterface_ce;
zend_class_entry *phalcon_mvc_view_engine_engineinterface_ce;
zend_class_entry *phalcon_mvc_viewbaseinterface_ce;
zend_class_entry *phalcon_acl_adapter_adapterinterface_ce;
Expand All @@ -73,6 +73,7 @@ zend_class_entry *phalcon_acl_roleinterface_ce;
zend_class_entry *phalcon_annotations_readerinterface_ce;
zend_class_entry *phalcon_cli_dispatcherinterface_ce;
zend_class_entry *phalcon_cli_router_routeinterface_ce;
zend_class_entry *phalcon_cli_routerinterface_ce;
zend_class_entry *phalcon_cli_taskinterface_ce;
zend_class_entry *phalcon_datamapper_pdo_connectionlocatorinterface_ce;
zend_class_entry *phalcon_datamapper_pdo_profiler_profilerinterface_ce;
Expand Down Expand Up @@ -124,7 +125,6 @@ zend_class_entry *phalcon_session_baginterface_ce;
zend_class_entry *phalcon_session_managerinterface_ce;
zend_class_entry *phalcon_acl_componentawareinterface_ce;
zend_class_entry *phalcon_acl_roleawareinterface_ce;
zend_class_entry *phalcon_cli_routerinterface_ce;
zend_class_entry *phalcon_di_initializationawareinterface_ce;
zend_class_entry *phalcon_di_serviceproviderinterface_ce;
zend_class_entry *phalcon_mvc_controller_bindmodelinterface_ce;
Expand Down Expand Up @@ -647,6 +647,7 @@ ZEND_DECLARE_MODULE_GLOBALS(phalcon)
PHP_INI_BEGIN()
STD_PHP_INI_BOOLEAN("phalcon.db.escape_identifiers", "1", PHP_INI_ALL, OnUpdateBool, db.escape_identifiers, zend_phalcon_globals, phalcon_globals)
STD_PHP_INI_BOOLEAN("phalcon.db.force_casting", "0", PHP_INI_ALL, OnUpdateBool, db.force_casting, zend_phalcon_globals, phalcon_globals)
STD_PHP_INI_BOOLEAN("phalcon.form.strict_entity_property_check", "0", PHP_INI_ALL, OnUpdateBool, form.strict_entity_property_check, zend_phalcon_globals, phalcon_globals)


STD_PHP_INI_BOOLEAN("phalcon.orm.case_insensitive_column_map", "0", PHP_INI_ALL, OnUpdateBool, orm.case_insensitive_column_map, zend_phalcon_globals, phalcon_globals)
Expand Down Expand Up @@ -695,7 +696,6 @@ static PHP_MINIT_FUNCTION(phalcon)
ZEPHIR_INIT(Phalcon_Html_Link_Interfaces_LinkInterface);
ZEPHIR_INIT(Phalcon_Html_Link_Interfaces_LinkProviderInterface);
ZEPHIR_INIT(Phalcon_Logger_Adapter_AdapterInterface);
ZEPHIR_INIT(Phalcon_Mvc_Model_ResultsetInterface);
ZEPHIR_INIT(Phalcon_Paginator_Adapter_AdapterInterface);
ZEPHIR_INIT(Phalcon_Translate_Adapter_AdapterInterface);
ZEPHIR_INIT(Phalcon_Assets_FilterInterface);
Expand All @@ -707,6 +707,7 @@ static PHP_MINIT_FUNCTION(phalcon)
ZEPHIR_INIT(Phalcon_Image_Adapter_AdapterInterface);
ZEPHIR_INIT(Phalcon_Logger_Formatter_FormatterInterface);
ZEPHIR_INIT(Phalcon_Mvc_Model_BehaviorInterface);
ZEPHIR_INIT(Phalcon_Mvc_Model_ResultsetInterface);
ZEPHIR_INIT(Phalcon_Mvc_ViewBaseInterface);
ZEPHIR_INIT(Phalcon_Mvc_View_Engine_EngineInterface);
ZEPHIR_INIT(Phalcon_Acl_Adapter_AdapterInterface);
Expand All @@ -723,6 +724,7 @@ static PHP_MINIT_FUNCTION(phalcon)
ZEPHIR_INIT(Phalcon_Acl_RoleInterface);
ZEPHIR_INIT(Phalcon_Annotations_ReaderInterface);
ZEPHIR_INIT(Phalcon_Cli_DispatcherInterface);
ZEPHIR_INIT(Phalcon_Cli_RouterInterface);
ZEPHIR_INIT(Phalcon_Cli_Router_RouteInterface);
ZEPHIR_INIT(Phalcon_Cli_TaskInterface);
ZEPHIR_INIT(Phalcon_DataMapper_Pdo_ConnectionLocatorInterface);
Expand Down Expand Up @@ -775,7 +777,6 @@ static PHP_MINIT_FUNCTION(phalcon)
ZEPHIR_INIT(Phalcon_Session_ManagerInterface);
ZEPHIR_INIT(Phalcon_Acl_ComponentAwareInterface);
ZEPHIR_INIT(Phalcon_Acl_RoleAwareInterface);
ZEPHIR_INIT(Phalcon_Cli_RouterInterface);
ZEPHIR_INIT(Phalcon_Di_InitializationAwareInterface);
ZEPHIR_INIT(Phalcon_Di_ServiceProviderInterface);
ZEPHIR_INIT(Phalcon_Mvc_Controller_BindModelInterface);
Expand Down Expand Up @@ -1324,6 +1325,7 @@ static void php_zephir_init_globals(zend_phalcon_globals *phalcon_globals)




phalcon_globals->orm.ast_cache = NULL;
phalcon_globals->orm.cache_level = 3;

Expand Down
4 changes: 2 additions & 2 deletions ext/phalcon.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
#include "phalcon/html/link/interfaces/linkinterface.zep.h"
#include "phalcon/html/link/interfaces/linkproviderinterface.zep.h"
#include "phalcon/logger/adapter/adapterinterface.zep.h"
#include "phalcon/mvc/model/resultsetinterface.zep.h"
#include "phalcon/paginator/adapter/adapterinterface.zep.h"
#include "phalcon/translate/adapter/adapterinterface.zep.h"
#include "phalcon/annotations/adapter/abstractadapter.zep.h"
Expand All @@ -64,6 +63,7 @@
#include "phalcon/logger/formatter/formatterinterface.zep.h"
#include "phalcon/mvc/model/behaviorinterface.zep.h"
#include "phalcon/mvc/model/exception.zep.h"
#include "phalcon/mvc/model/resultsetinterface.zep.h"
#include "phalcon/mvc/view/engine/engineinterface.zep.h"
#include "phalcon/mvc/viewbaseinterface.zep.h"
#include "phalcon/paginator/adapter/abstractadapter.zep.h"
Expand Down Expand Up @@ -107,6 +107,7 @@
#include "phalcon/cache/abstractcache.zep.h"
#include "phalcon/cli/dispatcherinterface.zep.h"
#include "phalcon/cli/router/routeinterface.zep.h"
#include "phalcon/cli/routerinterface.zep.h"
#include "phalcon/cli/taskinterface.zep.h"
#include "phalcon/datamapper/pdo/connectionlocatorinterface.zep.h"
#include "phalcon/datamapper/pdo/profiler/profilerinterface.zep.h"
Expand Down Expand Up @@ -224,7 +225,6 @@
#include "phalcon/cli/router.zep.h"
#include "phalcon/cli/router/exception.zep.h"
#include "phalcon/cli/router/route.zep.h"
#include "phalcon/cli/routerinterface.zep.h"
#include "phalcon/cli/task.zep.h"
#include "phalcon/config/adapter/grouped.zep.h"
#include "phalcon/config/adapter/ini.zep.h"
Expand Down
Loading

0 comments on commit 03653b4

Please sign in to comment.