formers / former

A powerful form builder, for Laravel and other frameworks (stand-alone too)
https://formers.github.io/former/
1.34k stars 204 forks source link

Fatal Error #83

Closed ignaciovazquez closed 11 years ago

ignaciovazquez commented 11 years ago

I'm getting the following error when trying to echo any form:

FatalErrorException: Compile Error: Cannot make non static method HtmlObject\Traits\Tag::isOpened() static in class Former\Form\Form in vendor/anahkiasen/former/src/Former/Form/Form.php line 14

Code:

echo Former::horizontal_open()->action(URL::to('admin/password'));
echo Former::xlarge_password('current_password', 'Current Password');
echo Former::xlarge_password('new_password', 'New Password');
echo Former::xlarge_password('new_password_check', 'New Password (again)');
echo Former::actions()->large_primary_submit('Save');
echo Former::close();
Anahkiasen commented 11 years ago

Laravel 3 or 4 ?

ignaciovazquez commented 11 years ago

Laravel 4.

Anahkiasen commented 11 years ago

This should be fixed — is your app up to date ?

ignaciovazquez commented 11 years ago

Yes, ran composer update several times. Below are the relevant composer.lock bits

{
            "name": "anahkiasen/former",
            "version": "dev-master",
            "source": {
                "type": "git",
                "url": "https://github.com/Anahkiasen/former.git",
                "reference": "5a829e430ec6d21fbe0da552e3b093f4b7b3dec2"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/Anahkiasen/former/zipball/5a829e430ec6d21fbe0da552e3b093f4b7b3dec2",
                "reference": "5a829e430ec6d21fbe0da552e3b093f4b7b3dec2",
                "shasum": ""
            },
            "require": {
                "anahkiasen/html-object": "dev-master",
                "anahkiasen/underscore-php": "dev-master",
                "illuminate/config": "4.0.*@dev",
                "illuminate/container": "4.0.*@dev",
                "illuminate/translation": "4.0.*@dev",
                "meido/form": "1.1.1"
            },
            "require-dev": {
                "mockery/mockery": "dev-master"
            },
            "type": "library",
            "autoload": {
                "psr-0": {
                    "Former": "src",
                    "Laravel": "src"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Anahkiasen",
                    "email": "ehtnam6@gmail.com"
                }
            ],
            "description": "A powerful form builder for the Laravel framework",
            "homepage": "http://anahkiasen.github.com/former/",
            "keywords": [
                "bootstrap",
                "form",
                "foundation",
                "laravel"
            ],
            "time": "2013-03-07 08:56:37"
        },
        {
            "name": "anahkiasen/html-object",
            "version": "dev-master",
            "source": {
                "type": "git",
                "url": "https://github.com/Anahkiasen/html-object.git",
                "reference": "faf9ce79d579866f7af4449018713ab7e41324fd"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/Anahkiasen/html-object/zipball/faf9ce79d579866f7af4449018713ab7e41324fd",
                "reference": "faf9ce79d579866f7af4449018713ab7e41324fd",
                "shasum": ""
            },
            "require": {
                "php": ">=5.3.0"
            },
            "type": "library",
            "autoload": {
                "psr-0": {
                    "HtmlObject": "src/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Anahkiasen",
                    "email": "ehtnam6@gmail.com"
                }
            ],
            "description": "A set of classes to create and manipulate HTML objects abstractions",
            "time": "2013-03-09 18:32:25"
        },
        {
            "name": "anahkiasen/underscore-php",
            "version": "dev-master",
            "source": {
                "type": "git",
                "url": "https://github.com/Anahkiasen/underscore-php.git",
                "reference": "15229b22dc2302ea1d56a7a74f254925dfd0ac32"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/Anahkiasen/underscore-php/zipball/15229b22dc2302ea1d56a7a74f254925dfd0ac32",
                "reference": "15229b22dc2302ea1d56a7a74f254925dfd0ac32",
                "shasum": ""
            },
            "require": {
                "illuminate/support": "4.0.*@dev",
                "patchwork/utf8": "1.0.*",
                "php": ">=5.3.0"
            },
            "type": "library",
            "autoload": {
                "psr-0": {
                    "Underscore": "src/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Maxime Fabre",
                    "email": "ehtnam6@gmail.com"
                }
            ],
            "description": "A redacted port of Underscore.js for PHP",
            "time": "2013-03-04 21:51:10"
        },

       [...]

{
            "name": "laravel/framework",
            "version": "dev-master",
            "source": {
                "type": "git",
                "url": "https://github.com/laravel/framework.git",
                "reference": "844202f38ff4096711bac405c61cb3084a155e3a"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/laravel/framework/zipball/844202f38ff4096711bac405c61cb3084a155e3a",
                "reference": "844202f38ff4096711bac405c61cb3084a155e3a",
                "shasum": ""
            },
            "require": {
                "ext-mcrypt": "*",
                "ircmaxell/password-compat": "1.0.*",
                "monolog/monolog": "1.3.*",
                "patchwork/utf8": "1.0.*",
                "php": ">=5.3.0",
                "swiftmailer/swiftmailer": "4.3.*",
                "symfony/browser-kit": "2.2.*",
                "symfony/console": "2.2.*",
                "symfony/css-selector": "2.2.*",
                "symfony/dom-crawler": "2.2.*",
                "symfony/event-dispatcher": "2.2.*",
                "symfony/finder": "2.2.*",
                "symfony/http-foundation": "2.2.*",
                "symfony/http-kernel": "2.2.*",
                "symfony/process": "2.2.*",
                "symfony/routing": "2.2.*",
                "symfony/translation": "2.2.*"
            },
            "replace": {
                "illuminate/auth": "self.version",
                "illuminate/cache": "self.version",
                "illuminate/config": "self.version",
                "illuminate/console": "self.version",
                "illuminate/container": "self.version",
                "illuminate/cookie": "self.version",
                "illuminate/database": "self.version",
                "illuminate/encryption": "self.version",
                "illuminate/events": "self.version",
                "illuminate/exception": "self.version",
                "illuminate/filesystem": "self.version",
                "illuminate/foundation": "self.version",
                "illuminate/hashing": "self.version",
                "illuminate/http": "self.version",
                "illuminate/log": "self.version",
                "illuminate/mail": "self.version",
                "illuminate/pagination": "self.version",
                "illuminate/queue": "self.version",
                "illuminate/redis": "self.version",
                "illuminate/routing": "self.version",
                "illuminate/session": "self.version",
                "illuminate/support": "self.version",
                "illuminate/translation": "self.version",
                "illuminate/validation": "self.version",
                "illuminate/view": "self.version",
                "illuminate/workbench": "self.version"
            },
            "require-dev": {
                "aws/aws-sdk-php": "2.1.*",
                "classpreloader/classpreloader": "dev-master",
                "mockery/mockery": "0.7.2"
            },
            "type": "library",
            "extra": {
                "branch-alias": {
                    "dev-master": "4.0-dev"
                }
            },
            "autoload": {
                "classmap": [
                    "src/Illuminate/Queue/Pheanstalk"
                ],
                "files": [
                    "src/Illuminate/Support/helpers.php"
                ],
                "psr-0": {
                    "Illuminate": "src/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "MIT"
            ],
            "authors": [
                {
                    "name": "Taylor Otwell",
                    "email": "taylorotwell@gmail.com"
                }
            ],
            "description": "The Laravel Framework.",
            "keywords": [
                "framework",
                "laravel"
            ],
            "time": "2013-03-09 17:10:15"
        },
        {
            "name": "laravelbook/laravel4-powerpack",
            "version": "dev-master",
            "source": {
                "type": "git",
                "url": "https://github.com/laravelbook/laravel4-powerpack.git",
                "reference": "6c773c6a3626dfd129654f1d692e3b99497a66a5"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/laravelbook/laravel4-powerpack/zipball/6c773c6a3626dfd129654f1d692e3b99497a66a5",
                "reference": "6c773c6a3626dfd129654f1d692e3b99497a66a5",
                "shasum": ""
            },
            "require": {
                "illuminate/routing": "4.0.x",
                "illuminate/support": "4.0.x",
                "php": ">=5.3.0",
                "raveren/kint": "dev-master"
            },
            "type": "library",
            "autoload": {
                "psr-0": {
                    "LaravelBook\\Laravel4Powerpack": "src/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "license": [
                "BSD-3-Clause"
            ],
            "authors": [
                {
                    "name": "Max Ehsan",
                    "email": "contact@laravelbook.com",
                    "homepage": "http://laravelbook.com/",
                    "role": "Maintainer"
                }
            ],
            "description": "Port of Laravel 3's HTML, Form and Str classes",
            "homepage": "http://laravelbook.com/",
            "keywords": [
                "form",
                "framework",
                "html",
                "laravel",
                "string",
                "support"
            ],
            "time": "2013-03-08 14:42:38"
        },
        {
            "name": "meido/form",
            "version": "v1.1.1",
            "source": {
                "type": "git",
                "url": "https://github.com/meido/form.git",
                "reference": "v1.1.1"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/meido/form/zipball/v1.1.1",
                "reference": "v1.1.1",
                "shasum": ""
            },
            "require": {
                "illuminate/routing": "4.0.x",
                "illuminate/support": "4.0.x",
                "meido/html": "1.1.x",
                "php": ">=5.3.0"
            },
            "type": "library",
            "autoload": {
                "classmap": [
                    "src/migrations"
                ],
                "psr-0": {
                    "Meido\\Form": "src/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "authors": [
                {
                    "name": "Joni Chandra",
                    "email": "joniliciously@gmail.com"
                }
            ],
            "description": "A port of Laravel 3's Form class",
            "time": "2013-02-22 03:45:35"
        },
        {
            "name": "meido/html",
            "version": "v1.1.2",
            "source": {
                "type": "git",
                "url": "https://github.com/meido/html.git",
                "reference": "v1.1.2"
            },
            "dist": {
                "type": "zip",
                "url": "https://api.github.com/repos/meido/html/zipball/v1.1.2",
                "reference": "v1.1.2",
                "shasum": ""
            },
            "require": {
                "illuminate/routing": "4.0.x",
                "illuminate/support": "4.0.x",
                "php": ">=5.3.0"
            },
            "type": "library",
            "autoload": {
                "classmap": [
                    "src/migrations"
                ],
                "psr-0": {
                    "Meido\\HTML": "src/"
                }
            },
            "notification-url": "https://packagist.org/downloads/",
            "authors": [
                {
                    "name": "Joni Chandra",
                    "email": "joniliciously@gmail.com"
                }
            ],
            "description": "A port of Laravel 3's HTML class",
            "time": "2013-02-22 07:11:11"
        },
ignaciovazquez commented 11 years ago

Composer versions

anahkiasen/former              dev-master 5a829e4   A powerful form builder for the Laravel framework
  anahkiasen/html-object         dev-master faf9ce7   A set of classes to create and manipulate HTML objects abstractions
  anahkiasen/underscore-php      dev-master 15229b2   A redacted port of Underscore.js for PHP
  fzaninotto/faker               dev-master a1fd779   Faker is a PHP library that generates fake data for you.
  guzzle/guzzle                  v3.1.2               Guzzle is a PHP HTTP client library and framework for building RESTful web service clients
  intervention/image             dev-master 1.2.0     Image handling and manipulation library with support for Laravel 4 integration
  ircmaxell/password-compat      1.0.x-dev v1.0.0     A compatibility library for the proposed simplified password hashing algorithm: https://wiki.php.net/rfc/password_hash
  laravel/framework              dev-master 844202f   The Laravel Framework.
  laravelbook/laravel4-powerpack dev-master 6c773c6   Port of Laravel 3's HTML, Form and Str classes
  meido/form                     v1.1.1               A port of Laravel 3's Form class
  meido/html                     v1.1.2               A port of Laravel 3's HTML class
  monolog/monolog                1.3.1                Sends your logs to files, sockets, inboxes, databases and various web services
  patchwork/utf8                 v1.0.4               UTF-8 strings handling for PHP 5.3: portable, performant and extended
  psr/log                        1.0.0                Common interface for logging libraries
  raveren/kint                   dev-master 654e669   Kint - debugging helper for PHP developers
  swiftmailer/swiftmailer        dev-master b6bfc8f   Swiftmailer, free feature-rich PHP mailer
  symfony/browser-kit            2.2.x-dev v2.2.0-RC3 Symfony BrowserKit Component
  symfony/console                2.2.x-dev be71bd9    Symfony Console Component
  symfony/css-selector           2.2.x-dev v2.2.0-RC3 Symfony CssSelector Component
  symfony/dom-crawler            2.2.x-dev v2.2.0     Symfony DomCrawler Component
  symfony/event-dispatcher       2.2.x-dev v2.2.0-RC3 Symfony EventDispatcher Component
  symfony/finder                 2.2.x-dev e8f6602    Symfony Finder Component
  symfony/http-foundation        2.2.x-dev d154b0d    Symfony HttpFoundation Component
  symfony/http-kernel            2.2.x-dev d003a31    Symfony HttpKernel Component
  symfony/process                2.2.x-dev v2.2.0-RC3 Symfony Process Component
  symfony/routing                2.2.x-dev 3a97436    Symfony Routing Component
  symfony/translation            2.2.x-dev v2.2.0-RC3 Symfony Translation Component
Anahkiasen commented 11 years ago

Ah no I see, you need to use the dev-agnostic branch — the dev-master is only for Laravel 3 (it's master because that's unfortunately the only branch Artisan looks for).

ignaciovazquez commented 11 years ago

Maxime,

That solved the issue, thanks very much. Looks like I was using the line from packaging dating back from ancient times.

Thanks a lot for the prompt help and the Former package!

Anahkiasen commented 11 years ago

No problem :)