Code Monkey home page Code Monkey logo

Comments (18)

Anahkiasen avatar Anahkiasen commented on May 30, 2024

That's weird, the class \Former\Fields\Input does exist. Are you sure everything is up to date and no file is missing ? If so, can you show me the code you're trying to use ?

from former.

spib avatar spib commented on May 30, 2024

I have the latest code (as of 10 minutes ago), here's the test code.

{{ Former::horizontal_open() }}

    {{ Former::xlarge_text('email') }}

    {{ Former::password('password') }}

    {{ Former::xlarge_text('first_name') }}

    {{ Former::xlarge_text('last_name') }}

    {{ Former::actions(Form::submit('Save', array('class'=>'btn btn-primary')) ) }}

{{ Former::close() }}

I have the bundle autoloaded in bundles.php and the alias in application.php. Nothing else. This is running on PHP 5.3.2

from former.

Anahkiasen avatar Anahkiasen commented on May 30, 2024

No specific former config file or anything populating the form ?

from former.

spib avatar spib commented on May 30, 2024

No, everything is default apart from that. Of course I also have some other bundles installed but I don't think any of those would be conflicting?

I'm unfamiliar with the autoloading functionality of PHP but could this be part of the problem?

from former.

Anahkiasen avatar Anahkiasen commented on May 30, 2024

Can you list the bundles installed and paste somewhere your application.php file ?

from former.

spib avatar spib commented on May 30, 2024

To rule out any conflicts I just did the following

  • Setup fresh install of Laravel from latest github
  • Copied in latest version of Former from github
  • Registered in bundles.php as auto true
  • Added alias in application.php
  • Added above form code to the default home/index.blade.php

And I get the same issue. Is there something in the server config which could be affecting it?

from former.

Anahkiasen avatar Anahkiasen commented on May 30, 2024

I'm going to try that as well, I have a PHP 5.3 server somewhere, I'll try uploading to it to see if it's a PHP error (although that would be weird as Travis tests Former on PHP 5.3 too).
Are you using Laravel master or develop branch ?

from former.

spib avatar spib commented on May 30, 2024

Master branch. Is there something I can do to help diagnose? Is there somewhere in the code where the types are loaded?

from former.

Anahkiasen avatar Anahkiasen commented on May 30, 2024

Just tested with fresh master on local and no error, but I'm running PHP 5.4.4 on local. Can't upload to my 5.3 server right now but I'll take a look into that.

from former.

Anahkiasen avatar Anahkiasen commented on May 30, 2024

I pushed a small commit, can you see if that changes anything ?

from former.

spib avatar spib commented on May 30, 2024

Still getting an error, but it's coming from the new exception you added. Here's the error message and stack trace

The class "\Former\Fields\Input" called by field "text" doesn't exist

#0 [internal function]: Former\Former::__callStatic('xlarge_text', Array)
#1 /vagrant/laravel/view.php(366) : eval()'d code(23): Former\Former::xlarge_text('email')
#2 /vagrant/laravel/view.php(366): eval()
#3 /vagrant/laravel/blade.php(71): Laravel\View->get()
#4 [internal function]: Laravel{closure}(Object(Laravel\View))
#5 /vagrant/laravel/event.php(199): call_user_func_array(Object(Closure), Array)
#6 /vagrant/laravel/event.php(138): Laravel\Event::fire('laravel.view.en...', Array, true)
#7 /vagrant/laravel/view.php(337): Laravel\Event::until('laravel.view.en...', Array)
#8 /vagrant/laravel/view.php(570): Laravel\View->render()
#9 /vagrant/laravel/response.php(246): Laravel\View->__toString()
#10 /vagrant/laravel/laravel.php(178): Laravel\Response->render()
#11 /vagrant/public/index.php(34): require('/vagrant/larave...')
#12 {main}

from former.

 avatar commented on May 30, 2024

Unfortunately, I'm also getting the same issue, I downloaded the code today and I'm on Ubuntu.

edit: I did post saying it was an issue with bootstrapper, but that's not the case...
edit2: form tags are fine but most others are giving a similar error

from former.

Anahkiasen avatar Anahkiasen commented on May 30, 2024

And what version of PHP do you run ?

from former.

 avatar commented on May 30, 2024
PHP 5.3.2-1ubuntu4.18 with Suhosin-Patch (cli) (built: Sep 12 2012 19:12:47) 
Copyright (c) 1997-2009 The PHP Group 
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

from former.

Anahkiasen avatar Anahkiasen commented on May 30, 2024

Hm I see, so this might have something to do with the version of PHP. I'll add some more versions to the Travis build to see if anything pops up.

EDIT : Ah damn, PHP 5.3.2 is too old for Travis. Gonna have to look somewhere else.
EDIT2 : Just found something that might be relevant. I pushed the corresponding fix, can you guys see if it's better ?

from former.

 avatar commented on May 30, 2024

Works perfectly now, thanks (and I never realised my PHP version was that old!)

from former.

Anahkiasen avatar Anahkiasen commented on May 30, 2024

Gonna wait for spib's feedback before I close this, but you know, still. VICTORY \o/

from former.

spib avatar spib commented on May 30, 2024

Yeah, that works for me too. Great work, thanks for the fix

from former.

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.