Comments (3)
I don't think this error is due to our StripTags filter.
To verify, I wrote the following test method, which I placed in our test/StripTagsFilterTest.php
:
public function testConstructorWorksWithoutErrors()
{
$html = <<< 'END'
<p>
<span>This is some <a href="https://getlaminas.org">text with a link</a></span>
</p>
END;
$expected = <<< 'END'
<p>
This is some <a href="https://getlaminas.org">text with a link</a>
</p>
END;
$allowedElements = [
'allowTags' => [
'ul','li','ol','br','p','b','strong','i','em','h1','h2','h3','h4','h5','a'
],
'allowAttribs' => [
'href'
]
];
$filter = new StripTagsFilter($allowedElements);
$this->assertSame($expected, $filter->filter($html));
}
This test passes as-is currently.
Looking in your write-up, the error message indicates the problem is in AddonLoader.php line 29
; is it possible that that file is the problem? There are no closures being used here, which makes me think the issue is elsewhere.
from laminas-filter.
Apologies for the delay in response. COVID threw everything out the window.
Anyway, I'm still having an issue. Once I installed Laminas via composer require, I get that error about AddonLoader. So, to fix it I had rename the vendor folder, and copy the previous backup of the vendor folder in (without Laminas in it). Error goes away.
So then I copied in just the Laminas folder from the renamed vendor folder. I did composer dump-autoload too hoping to make sure that it would rebuild the autoloader and possibly include Laminas.
I attempted to run my script. I now get an error that StripTags does not exist.
I attempted to install it locally in the same repo (instead of on the server) and I get a problem installing it:
Using version ^2.9 for laminas/laminas-filter
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/Solver.php on line 223
Check https://getcomposer.org/doc/articphp -i | grep memory_limit how to handle out of memory errors.
My PHP ini file is set to 1GB of memory_limit so this really shouldn't be happening.
from laminas-filter.
A bit more testing here...
I found some help about using "COMPOSER_MEMORY_LIMIT=-1" before running composer require. This fixed the problem with installing but immediately after installing ONLY Luminas I again get the AddonLoader error. I'm going to try building a new default Laravel instance and add Luminas to it and turn it into a service.
from laminas-filter.
Related Issues (20)
- [RFC]: Removal of `UriNormalizer` HOT 2
- v3 Docs: Improve documentation on change to final everywhere
- Drop dependency `Laminas\Uri` HOT 1
- Drop dependency on Laminas\i18n HOT 3
- PHP 8.1 support HOT 3
- Non-string scalar types produce a fatal error with StripNewlines HOT 6
- Hydration of object attached to form with unfiltered values on submission HOT 1
- Is `DateTimeFormatter` filter missed in documentation? HOT 1
- Removal of `container-interop/container-interop`
- Problem with FileInput HOT 1
- Dependency Dashboard
- Declaration of Laminas\Filter\FilterPluginManager::get($name, ?array $options = NULL) must be compatible with Laminas\ServiceManager\AbstractPluginManager::get($name, $options = Array, $usePeeringServiceManagers = true) HOT 10
- Action Required: Fix Renovate Configuration HOT 3
- [RFC]: Deprecate Compression Adapters Lzf, Rar and Snappy HOT 1
- Remove Deprecated Compression Adapters HOT 1
- Remove Deprecated Encryption & Decryption Filters HOT 1
- Mark filters as attributes HOT 7
- `Boolean` filter should also accept `int-mask<self::CONSTANTS>` via `__construct`
- Check for an instance of the `DateTimeInterface` instead of `DateTime` in `DateTimeFormatter` HOT 4
- ToString filter missing? HOT 1
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-filter.