Giter Club home page Giter Club logo

Comments (3)

weierophinney avatar weierophinney commented on June 15, 2024

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.

emergingdzns avatar emergingdzns commented on June 15, 2024

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.

emergingdzns avatar emergingdzns commented on June 15, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.