Comments (9)
@wiryonolau could you provide more details? What is happening exactly?
from laminas-form.
Hi we use this individually. Most of our project are still in 7.4. We using PHP-DI to load all dependency
before we only load view_helpers, so everything is normal.
We just start implement loading abstract factory similar to servicemanager
On loading the dependency it break on AttributeBuilder::__construct() since it always requested PHP8
from laminas-form.
Yes, but what is the exception (with trace), and what is the code (on your end) causing it?
from laminas-form.
On unittest only this error
PHP 8.0 or newer is required when using PHP attributes. You are running PHP 7.4.29.
Undefined index: FormAttributeBuilder
ERROR :
No entry or class found for 'FormAttributeBuilder' ( this is from PHP-DI )
from laminas-form.
Seems like you may want to report this on PHP-DI then, since the attributes are not used in this component, unless you explicitly use an attribute builder.
Closing here, since it's not a bug of laminas/laminas-form
from laminas-form.
Does __construct() not called by servicemanager ?
from laminas-form.
# ConfigProvider.php
<?php
public function getDependencyConfig(): array
{
return [
'abstract_factories' => [
FormAbstractServiceFactory::class,
],
'aliases' => [
Annotation\AnnotationBuilder::class => 'FormAnnotationBuilder',
Annotation\AttributeBuilder::class => 'FormAttributeBuilder',
FormElementManager::class => 'FormElementManager',
],
'factories' => [
'FormAnnotationBuilder' => Annotation\BuilderAbstractFactory::class,
'FormAttributeBuilder' => Annotation\BuilderAbstractFactory::class,
'FormElementManager' => FormElementManagerFactory::class,
],
];
}
FormAttributeBuilder never get called in here ?
from laminas-form.
It gets fetched (via factory) if you want to use it directly - you'd still need to get it from a configured servicemanager.
from laminas-form.
Ok my problem is in my unittest, cause I checking all registered service for any error or circular dependency. Guess the FormAttributeBuilder get called by it.
Wish they create a specific Exception for detecting PHP Version 8, instead of just throwing a generic Exception
from laminas-form.
Related Issues (20)
- Fix 3.1.1 also for 2.17.0 HOT 26
- CSRF element overwrites name option with element name HOT 3
- Removal of `container-interop/container-interop`
- After update from 2.17 to 3.1.1: Nested fieldset results in TypeError: template is undefined HOT 3
- Problems in tests with collections and setValidationGroup() HOT 3
- Github pages isn't working( HOT 7
- Dependency Dashboard
- Add onfocusout on $validGlobalAttributes HOT 1
- ComposedObject annotation doesn't work with Required(false)
- Can't require latest package version when using PHP 8.0 running composer HOT 4
- Ability to wrap element for complex form rendering HOT 4
- Bug of day 31 (Element\Month) HOT 4
- keys(option-values) generation in get(Hours|Minutes|Seconds|...)Options HOT 3
- DateTime related elements should accept DateTimeInterface values HOT 1
- Date pattern parsing fails with "exotic" locales HOT 6
- Date/Time selects helpers __invoke args may have no effect
- IntlDateFormatter::SHORT is not handled correctly by date-time select helper HOT 1
- [RFC] Improve type inference for `getData()` HOT 3
- \Laminas\Form\View\Helper\FormSelect does not allow class attribute for <option>s HOT 2
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.
from laminas-form.