Skip to content

EasyCorp/EasyAdminBundle

4.x
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

This PR was merged into the 4.x branch.

Discussion
----------

Fix BC break for fields with deep objects

Since version 4.4 (#5343) having a field declared as:

```php
TextField::new('period.start');
```
will throw an exception if `period` is `null`.
This is because (as per documentation)

```php
   /**
     * ......
     * `@throws` Exception\InvalidArgumentException If the property path is invalid
     * `@throws` Exception\AccessException          If a property/index does not exist or is not public
     * `@throws` Exception\UnexpectedTypeException  If a value within the path is neither object
     *                                            nor array
     */
    public function getValue(object|array $objectOrArray, string|PropertyPathInterface $propertyPath): mixed;
```

`UnexpectedTypeException` is thrown if any object in the path is `null`.

This PR fixes this by catching the exception and simply marking it not readable to keep the BC

Commits
-------

b85867d Fix BC break for deep objects
29801f9

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
doc
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Warning Due to the overwhelming amount of pending issues and pull requests, users can no longer interact with this repository (add comments, open issues, or create pull requests) during the entire month of July 2022. Users who committed to this repository in the past can still interact with it. We're sorry but we had to do this to take care of the mental health our maintainers.

EasyAdmin

EasyAdmin is a fast, beautiful and modern admin generator for Symfony applications.

EasyAdmin, a fast, beautiful and modern admin generator for Symfony applications

Installation

EasyAdmin 4 requires PHP 8.0.2 or higher and Symfony 5.4 or higher. Run the following command to install it in your application:

$ composer require easycorp/easyadmin-bundle

Documentation

Versions

Repository Branch EasyAdmin Version Symfony Compatibility PHP Compatibility Status Docs
4.x 4.x 5.4, and 6.x 8.0.2 or higher New features and bug fixes Read Docs
3.x 3.x 4.4, and 5.x 7.2.5 or higher Bug fixes only; no new features Read Docs
2.x 2.x 4.x, and 5.x 7.1.3 or higher No longer maintained Read Docs
1.x 1.x 2.x, 3.x and 4.x 5.3.0 or higher No longer maintained -

Demo Application

easyadmin-demo is a complete Symfony application that showcases EasyAdmin features. It's based on the Symfony Demo project.

License

This software is published under the MIT License