PHP Classes

The example is missing needed files to include like .

Recommend this page to a friend!

      Stupidly Simple PHP Calendar  >  All threads  >  The example is missing needed files...  >  (Un) Subscribe thread alerts  
Subject:The example is missing needed files...
Summary:Package rating comment
Messages:7
Author:David Winstead
Date:2014-08-18 14:38:23
 

David Winstead rated this package as follows:

Utility: Not sure
Consistency: Sufficient
Examples: Bad
Unit tests: Bad

  1. The example is missing needed files...   Reply   Report abuse  
Picture of David Winstead David Winstead - 2014-08-18 14:38:23
The example is missing needed files to include like ../vendor which causes the example to throw errors and to not work properly.

  2. Re: The example is missing needed files...   Reply   Report abuse  
Picture of Marcos Sigueros Marcos Sigueros - 2014-08-18 15:18:05 - In reply to message 1 from David Winstead
First of all you're gonna need composer for this library. Is intended to use in continuous integration environments so that's why this requirement is a must have.

To test the example you have to follow the instructions in the readme.md or simply visit https://github.com/alrik11es/stupidly-simple-calendar

Once you're done with composer install/update then you can browse this example.php in the examples directory and then execute in the browser.

The vendors directory is needed by composer to install all the vendors and the auto-loader so that's why is not working as you have.

  3. Re: The example is missing needed files...   Reply   Report abuse  
Picture of David Winstead David Winstead - 2014-08-18 16:33:26 - In reply to message 2 from Marcos Sigueros
Thanks for the reply and information, much appreciated.

  4. Re: The example is missing needed files...   Reply   Report abuse  
Picture of Richard Richard - 2014-11-24 00:47:46 - In reply to message 2 from Marcos Sigueros
If compose is required! Then why do you have in the example1.php file:

/**
* To execute this example you need to install the library with composer in order
* to use the autoload in this include file.
*
*If you don't wane use composer ** (just include each file from the src directory.) **
*/

**JUST INCLUDE EACH FILE FROM THE SRC DIRECTORY?**

Why is it that I can not find a single calendar script that will work like the author intends for it to? even after doing what you tell us to the program wont work I am still getting the following error:

Fatal error: Interface 'SSC\formatters\FormatterInterface' not found in C:\wamp\www\Calendar\src\SSC\formatters\ArrayFormatter.php on line 3

  5. Re: The example is missing needed files...   Reply   Report abuse  
Picture of alrik alrik - 2014-11-24 13:24:00 - In reply to message 4 from Richard
Have you tried including all the needed files?

include 'calendar/src/SSC/Calendar.php';
include 'calendar/src/SSC/CalendarConfig.php';
include 'calendar/src/SSC/formatters/FormatterInterface.php';
include 'calendar/src/SSC/formatters/ArrayFormatter.php';
include 'calendar/src/SSC/formatters/ObjectFormatter.php';
include 'calendar/src/SSC/formatters/JsonFormatter.php';

  6. Re: The example is missing needed files...   Reply   Report abuse  
Picture of Richard Richard - 2014-11-24 16:55:06 - In reply to message 5 from alrik
YES all of them are in the directory as you have them listed

  7. Re: The example is missing needed files...   Reply   Report abuse  
Picture of alrik alrik - 2014-11-24 17:00:17 - In reply to message 6 from Richard
Can you write here some code so I can try to reproduce the behavior?

I've tried with my computer and I cannot reproduce.
Lets set up some light on this issue so nobody encounters it again. :)