mattsparks / blns-php

A PHP class to easily work with the Big List of Naughty Strings.
MIT License
59 stars 3 forks source link

Cannot install with composer #1

Closed peschee closed 4 years ago

peschee commented 4 years ago

Hi

I'm running into an issue when trying to use your package: composer require mattsparks/blns-php --dev

Gives me

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for mattsparks/blns-php dev-master -> satisfiable by mattsparks/blns-php[dev-master].
    - mattsparks/blns-php dev-master requires blns/blns * -> no matching package found.

~The first problem is because my minimum-stability (https://getcomposer.org/doc/04-schema.md#minimum-stability) is not set to dev. Which I assume is quite normal for many projects. You could probably solve this by releasing a version.~

As for the second line: I see that you define blns/blns as a repository in your composer.json. However, this does not seem to be picked up.

EDIT: It seems that when I add the following

        {
            "type": "package",
            "package": {
                "name": "blns/blns",
                "version": "1.0.0",
                "dist": {
                    "url": "https://github.com/minimaxir/big-list-of-naughty-strings/archive/master.zip",
                    "type": "zip"
                },
                "config": {
                    "vendor-dir": "blns"
                }
            }
        }

to my composer.json, the installation with composer require mattsparks/blns-php --dev works.

EDIT2: There's another issue when you try using this package as a dependency. The BLNS directory path does not work

const BLNS_DIR = __DIR__.'/../vendor/blns/blns/';

it should be

const BLNS_DIR = __DIR__.'/../../../../vendor/blns/blns/';
mattsparks commented 4 years ago

@peschee For whatever reason, I missed the notification for this issue. Sorry about that.

I'll try and take a look at this in the next couple of days. Thanks for bringing it to my attention!

peschee commented 4 years ago

No worries, let me know how it goes.

mattsparks commented 4 years ago

These issues are resolved with v1.0.1