Skip to content

Commit

Permalink
Merge branch 'release/v1.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxes3 committed Mar 25, 2024
2 parents 790e996 + 0d29e50 commit a476208
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 48 deletions.
49 changes: 23 additions & 26 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,48 +16,45 @@
],
"require": {
"php": ">=8.1",
"symfony/framework-bundle": "^5.4|^6.0",
"symfony/http-kernel": "^5.4|^6.0",
"symfony/security-bundle": "^5.4|^6.0",
"symfony/serializer": "^5.4|^6.0",
"symfony/form": "^5.4|^6.0",
"symfony/twig-bundle": "^5.4|^6.0",
"symfony/process": "^5.4|^6.0",
"symfony/framework-bundle": "^5.4|^6.4|^7.0",
"symfony/http-kernel": "^5.4|^6.4|^7.0",
"symfony/security-bundle": "^5.4|^6.4|^7.0",
"symfony/serializer": "^5.4|^6.4|^7.0",
"symfony/form": "^5.4|^6.4|^7.0",
"symfony/twig-bundle": "^5.4|^6.4|^7.0",
"symfony/process": "^5.4|^6.4|^7.0",
"symfony/ux-turbo": "^2.0",
"symfony/stimulus-bundle": "^2.0",
"symfony/webpack-encore-bundle": "^1.14|^2.0",
"araise/core-bundle": "^1.0",
"araise/table-bundle": "^1.0",
"araise/search-bundle": "^3.0",
"knplabs/knp-menu-bundle": "~v3.2.0",
"symfony/webpack-encore-bundle": "^1.14|^2.1",
"araise/core-bundle": "^1.1",
"araise/table-bundle": "^1.1",
"araise/search-bundle": "^3.1",
"knplabs/knp-menu-bundle": "^v3.2.0",
"doctrine/inflector": "^2.0",
"symfony/maker-bundle": "^1.0.0",
"twig/twig": "^3.4.3|^2.15.3",
"doctrine/orm": "^2.13.3"
"doctrine/orm": "^2.13.3|^3.1",
"doctrine/annotations": "^1.13.2|^2.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^5.4|^6.0",
"symfony/config": "^5.4|^6.0",
"symfony/dependency-injection": "^5.4|^6.0",
"symfony/yaml": "^5.4|^6.0",
"symfony/validator": "^5.4|^6.0",
"nyholm/symfony-bundle-test": "^1.8",
"symfony/phpunit-bridge": "^5.4|^6.4|^7.0",
"symfony/config": "^5.4|^6.4|^7.0",
"symfony/dependency-injection": "^5.4|^6.4|^7.0",
"symfony/yaml": "^5.4|^6.4|^7.0",
"symfony/validator": "^5.4|^6.4|^7.0",
"doctrine/doctrine-bundle": "^2.5",
"doctrine/annotations": "^1.13.2",
"whatwedo/php-coding-standard": "^1.0",
"zenstruck/foundry": "^1.16",
"zenstruck/console-test": "^v1.1.0",
"symfony/orm-pack": "^1.0",
"symfony/translation": "^5.4|^6.0",
"symfony/translation": "^5.4|^6.4|^7.0",
"gedmo/doctrine-extensions": "^3.5",
"symfony/dotenv": "^5.4|^6.0",
"symfony/test-pack": "^1.0",
"symfony/runtime": "^5.4|^6.0",
"doctrine/orm": "^2.13.3",
"symfony/dotenv": "^5.4|^6.4|^7.0",
"symfony/runtime": "^5.4|^6.4|^7.0",
"phpstan/phpstan": "^1.5",
"mhujer/breadcrumbs-bundle": "^1.5",
"whatwedo/twig-bootstrap-icons": "^1.0"
},

"suggest": {
"mhujer/breadcrumbs-bundle": "Allows creation of breadcrumbs"
},
Expand Down
5 changes: 2 additions & 3 deletions src/Definition/AbstractDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
use araise\TableBundle\Extension\SortExtension;
use araise\TableBundle\Factory\TableFactory;
use araise\TableBundle\Table\Table;
use Doctrine\Common\Util\ClassUtils;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\QueryBuilder;
use Doctrine\Persistence\ObjectRepository;
Expand Down Expand Up @@ -571,10 +570,10 @@ public function addExtension(ExtensionInterface $extension): void
public static function supports(mixed $entity): bool
{
if (is_object($entity)) {
$entity = ClassUtils::getClass($entity);
$entity = $entity::class;
}

return is_a(ClassUtils::getRealClass($entity), static::getEntity(), true);
return is_a($entity, static::getEntity(), true);
}

public static function getRoutePathPrefix(): string
Expand Down
5 changes: 1 addition & 4 deletions src/Normalizer/BaseObjectNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,7 @@ protected function getAttributeValue(object $object, string $attribute, string $
return $attribute === $this->discriminatorCache[$cacheKey] ? $this->classDiscriminatorResolver->getTypeForMappedObject($object) : $this->propertyAccessor->getValue($object, $attribute);
}

/**
* @return void
*/
protected function setAttributeValue(object $object, string $attribute, mixed $value, string $format = null, array $context = [])
protected function setAttributeValue(object $object, string $attribute, mixed $value, string $format = null, array $context = []): void
{
try {
$this->propertyAccessor->setValue($object, $attribute, $value);
Expand Down
12 changes: 10 additions & 2 deletions src/Resources/assets/controllers/tooltip_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,20 @@ import 'tippy.js/dist/tippy.css';

export default class extends Controller {
static values = {
title: String
title: String,
ishtml: { type: Boolean, default: false },
placement: { type: String, default: 'top' },
interactive: { type: Boolean, default: false },
offset: { type: Array, default: [0, 10] },
}

connect() {
tippy(this.element, {
content: this.titleValue
content: this.titleValue,
allowHTML: this.ishtmlValue,
placement: this.placementValue,
interactive: this.interactiveValue,
offset: this.offsetValue
});
}

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/views/includes/topbar/_actions.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
{{ wwd_crud_render_action(action, view) }}
{% endfor %}

{% if view.actions|length == overflow %}
{% if view.actions|length == overflow0 %}
{% for action in view.actions|slice(overflow0) %}
{{ wwd_crud_render_action(action, view) }}
{% endfor %}
Expand Down
7 changes: 2 additions & 5 deletions src/Routing/CrudLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function __construct(
parent::__construct();
}

public function load(mixed $resource, mixed $type = null): RouteCollection
public function load(mixed $resource, ?string $type = null): RouteCollection
{
if ($this->isLoaded) {
throw new \RuntimeException('Do not add the "araise_crud" loader twice');
Expand Down Expand Up @@ -98,10 +98,7 @@ public function load(mixed $resource, mixed $type = null): RouteCollection
return $routes;
}

/**
* @return bool
*/
public function supports(mixed $resource, mixed $type = null)
public function supports(mixed $resource, ?string $type = null): bool
{
return $type === 'araise_crud';
}
Expand Down
2 changes: 0 additions & 2 deletions src/View/DefinitionView.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use araise\CrudBundle\Form\Type\EntityHiddenType;
use araise\CrudBundle\Form\Type\EntityPreselectType;
use araise\CrudBundle\Manager\DefinitionManager;
use Doctrine\Common\Annotations\Reader;
use Symfony\Bundle\SecurityBundle\Security;
use Symfony\Component\Form\Extension\Core\Type\FormType;
use Symfony\Component\Form\FormBuilderInterface;
Expand Down Expand Up @@ -48,7 +47,6 @@ public function __construct(
protected RouterInterface $router,
protected RequestStack $requestStack,
protected AuthorizationCheckerInterface $authorizationChecker,
protected Reader $annotationReader,
protected Security $security,
) {
}
Expand Down
2 changes: 1 addition & 1 deletion tests/App/config/packages/doctrine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ doctrine:
charset: utf8mb4
default_table_options:
charset: utf8mb4
collate: utf8mb4_unicode_ci
collation: utf8mb4_unicode_ci
url: '%env(resolve:DATABASE_URL)%'
orm:
default_entity_manager: default
Expand Down
2 changes: 0 additions & 2 deletions tests/App/config/packages/framework.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ framework:
router:
utf8: true

annotations: true

session:
handler_id: null
cookie_secure: auto
Expand Down
2 changes: 0 additions & 2 deletions tests/App/config/packages/security.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
security:
enable_authenticator_manager: true

providers:
app_user_provider:
memory:
Expand Down

0 comments on commit a476208

Please sign in to comment.