zendframework / zend-form

Form component from Zend Framework
BSD 3-Clause "New" or "Revised" License
69 stars 87 forks source link

zend math required for csrf validation - not in require or suggest #195

Closed nclundsten closed 6 years ago

nclundsten commented 6 years ago

re composer.json

requires zend-validator, but no way to bring in zend math from zend-form package, as its only "suggested"

any way to fix this? or should i just require zend math in my apps composer.json?

froschdesign commented 6 years ago

requires zend-validator

Right and zend-validator's composer.json includes:

"suggest": {
    "zendframework/zend-math": "Zend\\Math component, required by the Csrf validator",
}

https://github.com/zendframework/zend-validator/blob/87e743d11d49a157011a49a962c25e7a11adc7c5/composer.json#L38

nclundsten commented 6 years ago

Yes, but thats 2 levels deep of suggests, just to get a part of zend form working.. this is intended??

On Feb 26, 2018 9:57 PM, "Frank Brückner" notifications@github.com wrote:

requires zend-validator

Right and zend-validator's composer.json includes:

"suggest": { "zendframework/zend-math": "Zend\Math component, required by the Csrf validator", }

https://github.com/zendframework/zend-validator/blob/ 87e743d11d49a157011a49a962c25e7a11adc7c5/composer.json#L38

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zendframework/zend-form/issues/195#issuecomment-368756630, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOoJew0p-E-1dmzy6zPVL-DmKn8aCquks5tY5ksgaJpZM4SUSD0 .

froschdesign commented 6 years ago

@nclundsten zend-form doesn't need zend-math, but zend-validator. The same like PHPUnit and Xdebug extension or Guzzle and PSR Log. This is the normal behavior with dependencies when dealing with Composer.

nclundsten commented 6 years ago

Ok, thanks, ill just require zend math in my apps composer json :)

On Feb 26, 2018 10:16 PM, "Frank Brückner" notifications@github.com wrote:

@nclundsten https://github.com/nclundsten zend-form doesn't need zend-math, but zend-validator. The same like PHPUnit and Xdebug extension or Guzzle and PSR Log. This is the normal behavior with dependencies when dealing with Composer.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/zendframework/zend-form/issues/195#issuecomment-368759713, or mute the thread https://github.com/notifications/unsubscribe-auth/AAOoJaFCU0R_AO9nRPG_XDq0UkPaJDBkks5tY529gaJpZM4SUSD0 .

froschdesign commented 6 years ago

ill just require zend math in my apps composer json

Only if you need the Csrf validator! 😉

Ocramius commented 6 years ago

We could probably figure out if Zend\Math can be dropped from dependencies since PHP 7.2 now has ext-sodium

On 27 Feb 2018 07:16, "Frank Brückner" notifications@github.com wrote:

@nclundsten https://github.com/nclundsten zend-form doesn't need zend-math, but zend-validator. The same like PHPUnit and Xdebug extension or Guzzle and PSR Log. This is the normal behavior with dependencies when dealing with Composer.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/zendframework/zend-form/issues/195#issuecomment-368759713, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJakBytsOGids6-Bo9qKg9vC3cD15-0ks5tY528gaJpZM4SUSD0 .

froschdesign commented 6 years ago

@Ocramius Good point!