GithubHelp home page GithubHelp logo

Install with composer about phpspreadsheet HOT 21 CLOSED

phpoffice avatar phpoffice commented on September 27, 2024
Install with composer

from phpspreadsheet.

Comments (21)

nickdnk avatar nickdnk commented on September 27, 2024 5

from phpspreadsheet.

theofidry avatar theofidry commented on September 27, 2024 4

I think if you target the modern PHP community, Composer is the thing to get users :) The PHP community is well educated regarding semver with Composer, so as long as you follow it and don't abuse of it it should go well even if the package is far from being stable.

from phpspreadsheet.

theofidry avatar theofidry commented on September 27, 2024 4

@ligeirinhorj according to the stack trace you are missing the extension gd. That said I advise you to try an actual support plaftorm, e.g. StackOverflow, rather than highjacking an unrelated issue for it

from phpspreadsheet.

MarkBaker avatar MarkBaker commented on September 27, 2024 3

Not until it's properly stable enough

from phpspreadsheet.

MarkBaker avatar MarkBaker commented on September 27, 2024 3

Forced to make a choice at this point, I'd recommend using a more up-to-date version of PHPExcel (1.8.1 is the last production release of PHPExcel); but to be aware that a change to using PHPSpreadsheet in the future won't be backward compatible with PHPExcel

from phpspreadsheet.

adamhopkinson avatar adamhopkinson commented on September 27, 2024 3

As @shadiakiki1986 says above, if you're happy to accept the current instability and recommendations above, you can install with composer like this:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/PHPOffice/PhpSpreadsheet"
    }
  ],
  "require": {
    "PHPOffice/PhpSpreadsheet": "dev-master"
  }
}

from phpspreadsheet.

thorne51 avatar thorne51 commented on September 27, 2024 2

@caponica Agreed. The section https://github.com/PHPOffice/PhpSpreadsheet#phpexcel-vs-phpspreadsheet- in the README.md mainly addresses contributions but should probably mention that PhpSpreadsheet is still in development

from phpspreadsheet.

PowerKiKi avatar PowerKiKi commented on September 27, 2024 2

I think it would be a good thing. We are far from being stable, but it would allow us to explicitly mark the code as alpha (and beta later on).

from phpspreadsheet.

nickdnk avatar nickdnk commented on September 27, 2024 2

+1 for Composer. I'd use it if it was available, alpha or beta. That means I'd discover bugs and report them, which would help improve the software overall. Without Composer I will not use it for the reasons mentioned by @theofidry.

I think that pattern applies to a lot of users. I don't see how making it available on composer would do any harm.

from phpspreadsheet.

theofidry avatar theofidry commented on September 27, 2024 1

@adamhopkinson the issue is about making good use of Composer for managing this package, stable or not, instead of giving a workaround to install a GitHub package with Composer.

from phpspreadsheet.

shadiakiki1986 avatar shadiakiki1986 commented on September 27, 2024

You can use the composer repositories tag, documented here

from phpspreadsheet.

thorne51 avatar thorne51 commented on September 27, 2024

@MarkBaker

Not until it's properly stable enough

Would you rather recommend sticking to PHPExcel then? I'm starting a new feature on a project which already has PHPExcel 1.7.9 in it, and would like to know if you (the author's) would recommend using PHPSpreadsheet or PHPExcel?

from phpspreadsheet.

caponica avatar caponica commented on September 27, 2024

Could I recommend that you put a note in the root README.md that this project is not yet stable and that people coming to this new should still use PhpExcel?

Then, when PhpSpreadsheet is stable, update the README.md again.

from phpspreadsheet.

PowerKiKi avatar PowerKiKi commented on September 27, 2024

addressed in 699d11f

from phpspreadsheet.

theofidry avatar theofidry commented on September 27, 2024

Any reason why not using Composer still? I personally know no one using custom autoloader except for legacy reasons, and that's strongly discouraged as you can't benefit from the performance gains offered by composer and with the --authoritative-classmap option, files autoloaded another way than composer will simply fail.

If the release is not stable, you can still tag it as alpha, beta or rc. You have several PHP projects as examples.

from phpspreadsheet.

PowerKiKi avatar PowerKiKi commented on September 27, 2024

I am not against submitting to packagist as an alpha (or even without any releases), but unfortunately I don't have access to PHPOffice namespace over there. So that's up to @Progi1984 or @MarkBaker ...

from phpspreadsheet.

Progi1984 avatar Progi1984 commented on September 27, 2024

I let @MarkBaker choosing as lead dev of the project. But if he accepts, i can push the package on Packagist.

from phpspreadsheet.

MarkBaker avatar MarkBaker commented on September 27, 2024

I've added PHPSpreadsheet to Packagist, but I haven't modified the composer in any way to flag it as alpha yet

from phpspreadsheet.

theofidry avatar theofidry commented on September 27, 2024

👍

from phpspreadsheet.

PowerKiKi avatar PowerKiKi commented on September 27, 2024

Thanks, @mark, I'll tag an alpha release as soon as we decide whether the next version should be a 2.0 (because following PHPExcel versioning), or a 1.0 (because PhpSpreadsheet is a "new" project).

I would personally go for a 1.0 to break away as much as possible from PHPExcel. What do you think ?

from phpspreadsheet.

ligeirinhorj avatar ligeirinhorj commented on September 27, 2024

Can someone help me with the error below?

$ composer require phpoffice/phpspreadsheet
Using version ^1.2 for phpoffice/phpspreadsheet
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

Problem 1
- phpoffice/phpspreadsheet 1.2.1 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- phpoffice/phpspreadsheet 1.2.0 requires ext-gd * -> the requested PHP extension gd is missing from your system.
- Installation request for phpoffice/phpspreadsheet ^1.2 -> satisfiable by phpoffice/phpspreadsheet[1.2.0, 1.2.1].

To enable extensions, verify that they are enabled in your .ini files:
- C:\Users\Ligeirinho\Downloads\php-7.2.4-nts-Win32-VC15-x64\php.ini
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.

Installation failed, deleting ./composer.json.

from phpspreadsheet.

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.